tip.cfg
Class EntryPoint

java.lang.Object
  extended by tip.cfg.AProgramPoint
      extended by tip.cfg.EntryPoint
All Implemented Interfaces:
IProgramPoint

public class EntryPoint
extends AProgramPoint

EntryPoint represents the entry point of a control flow graph.

Author:
Johnni Winther, jw@brics.dk

Constructor Summary
EntryPoint()
          Creates a new entry point with no associated node.
EntryPoint(Node _node_)
          Creates a new entry point associated with _node_.
 
Method Summary
<A> A
apply(CFGAnswer<A> caller)
          Returns an answer by calling CFGAnswer.caseEntryPoint(Node,EntryPoint) the visitor caller with this entry point.
<Q,A> A
apply(CFGQuestionAnswer<Q,A> caller, Q question)
          Returns an answer by calling CFGQuestionAnswer.caseEntryPoint(Node,EntryPoint,Object) the visitor caller with this entry point.
 boolean apply(ICFGAnalysis analysis)
          Calls ICFGAnalysis.caseEntryPoint(Node,EntryPoint) on analysis and returns the result.
 EntryPoint clone()
          Returns a clone of the entry point with no predecessors or successors.
 String getNodeText(Answer<String> nodeText)
          Returns a textual representation of the entry point, which is "{entry}".
 String toString()
          Returns a textual representation of this EntryPoint.
 
Methods inherited from class tip.cfg.AProgramPoint
addPredecessor, addSuccessor, getNode, getPredecessors, getSuccessors, getVicinity, removePredecessor, removeSuccessor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntryPoint

public EntryPoint()
Creates a new entry point with no associated node.


EntryPoint

public EntryPoint(Node _node_)
Creates a new entry point associated with _node_.

Parameters:
_node_ - the Node associated with this entry point
Method Detail

apply

public boolean apply(ICFGAnalysis analysis)
Calls ICFGAnalysis.caseEntryPoint(Node,EntryPoint) on analysis and returns the result.

Returns:
the result of calling ICFGAnalysis.caseEntryPoint(Node,EntryPoint) on analysis

getNodeText

public String getNodeText(Answer<String> nodeText)
Returns a textual representation of the entry point, which is "{entry}".

Parameters:
nodeText - the Answer used
Returns:
a textual representation of the entry point

apply

public <A> A apply(CFGAnswer<A> caller)
Returns an answer by calling CFGAnswer.caseEntryPoint(Node,EntryPoint) the visitor caller with this entry point.

Parameters:
caller - the Answer used
Returns:
the answer as returned from caller

apply

public <Q,A> A apply(CFGQuestionAnswer<Q,A> caller,
                     Q question)
Returns an answer by calling CFGQuestionAnswer.caseEntryPoint(Node,EntryPoint,Object) the visitor caller with this entry point.

Parameters:
caller - the QuestionAnswer used
question - the question used
Returns:
the answer as returned from caller on question

clone

public EntryPoint clone()
Returns a clone of the entry point with no predecessors or successors.

Specified by:
clone in interface IProgramPoint
Specified by:
clone in class AProgramPoint
Returns:
a clone of the entry point with no predecessors or successors

toString

public String toString()
Returns a textual representation of this EntryPoint.

Overrides:
toString in class Object
Returns:
a textual representation of this EntryPoint