Package org.jtool.cfg

Class CFGParameter


public class CFGParameter extends CFGStatement
A node for a parameter of a method declaration or an argument of a method call.
  • Constructor Details

    • CFGParameter

      public CFGParameter(org.eclipse.jdt.core.dom.ASTNode node, CFGNode.Kind kind, int index)
      Creates a new object that represents a parameter. This method is not intended to be invoked by clients.
      Parameters:
      node - the AST node correspond to this node
      kind - the kind of this node
      index - the index number of the parameter list or the argument lists.
  • Method Details

    • setIndex

      public void setIndex(int index)
      Sets the index number of the parameter list or the argument lists. This method is not intended to be invoked by clients.
      Parameters:
      index - the index number to be set
    • getIndex

      public int getIndex()
      Returns the index number of the parameter list or the argument lists.
      Returns:
      the index number
    • setParent

      public void setParent(CFGNode node)
      The parent node that this node directly dangles on. This method is not intended to be invoked by clients.
      Parameters:
      node - the parent node to be set
    • getParent

      public CFGNode getParent()
      Returns the parent node that this node directly dangles on.
      Returns:
      the parent node
    • getDefVariable

      public JVariableReference getDefVariable()
      Returns the variable defined when a method is called.
      Returns:
      the defined variable, or null if there is no defined variable
    • getUseVariable

      public JVariableReference getUseVariable()
      Returns the variable used when a method is called.
      Returns:
      the used variable, or null if there is no used variable