Package org.jtool.cfg

Class JLocalVarReference


public class JLocalVarReference extends JVariableReference
An class that represents a reference to a local variable.
  • Constructor Details

    • JLocalVarReference

      public JLocalVarReference(org.eclipse.jdt.core.dom.ASTNode node, org.eclipse.jdt.core.dom.IVariableBinding vbinding)
      Creates a new object that represents a reference to a local variable. This constructor is not intended to be invoked by clients.
      Parameters:
      node - the AST node corresponding to this reference
      vbinding - the variable binding information on this reference
  • Method Details

    • isLocalAccess

      public boolean isLocalAccess()
      Tests if this is a reference to a local variable.
      Overrides:
      isLocalAccess in class JReference
      Returns:
      always true that indicates a reference to a local variable
    • isParameter

      public boolean isParameter()
      Tests if this is a reference to a parameter.
      Returns:
      true if this is a reference to a parameter, otherwise false
    • getVariableId

      public int getVariableId()
      Returns the identification number of a referenced variable.
      Returns:
      the identification number
    • getStartPosition

      public int getStartPosition()
      Returns the position that indicates where the code fragment for this reference begins.
      Overrides:
      getStartPosition in class JReference
      Returns:
      the index value of the position on the source code
    • toString

      public String toString()
      Obtains information on this local variable reference.
      Overrides:
      toString in class JVariableReference
      Returns:
      the string representing the information