Class JavaLocalVar


public class JavaLocalVar extends JavaVariable
An object representing a local variable or a formal parameter.
  • Constructor Details

    • JavaLocalVar

      public JavaLocalVar(org.eclipse.jdt.core.dom.VariableDeclaration node, JavaMethod jmethod)
      Creates a new object representing a local variable. This constructor is not intended to be invoked by clients.
      Parameters:
      node - the AST node for this local variable
      jmethod - the method that contains this local variable in its body
  • Method Details

    • getVariableBinding

      public org.eclipse.jdt.core.dom.IVariableBinding getVariableBinding()
      Returns the variable binding information on this local variable.
      Returns:
      the variable binding information
    • getVariableId

      public long getVariableId()
      Returns the identification number of this local variable.
      Returns:
      the identification number
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(JavaLocalVar jlocal)
      Tests if a given local variable is equal to this local variable.
      Parameters:
      jlocal - the local variable to be checked
      Returns:
      the true if the given local variable is equal to this local variable
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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