|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.tac.eclipse.EclipseTAC
public class EclipseTAC
This class converts AST nodes from a single method to TAC instructions. A separate instance of this class is required for each method.
CompilationUnitTACs.getMethodTAC(MethodDeclaration)
Method Summary | |
---|---|
ThisVariable |
implicitThisVariable(IBinding accessedElement)
Determines the implicit this variable for a method call or field access. |
TACInstruction |
instruction(ASTNode astNode)
Instruction for a given AST Node. |
static boolean |
isDefaultBinding(IBinding binding)
|
static boolean |
isStaticBinding(IBinding binding)
|
ITypeBinding |
resolveThisType()
Returns the type of this , if any. |
SourceVariable |
sourceVariable(IVariableBinding binding)
Determines the variable for the given parameter or local variable binding. |
SuperVariable |
superVariable(Name qualifier)
Determines the super variable, taking a possible qualifier into account. |
ThisVariable |
thisVariable()
Returns the represented method's (unqualified) this . |
TypeVariable |
typeVariable(ITypeBinding binding)
Determines the variable for a given type binding. |
Variable |
variable(ASTNode astNode)
Returns the variable representing the result of evaluating the given AST node. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public TACInstruction instruction(ASTNode astNode)
astNode
-
null
if none exists.public Variable variable(ASTNode astNode)
IEclipseVariableQuery
variable
in interface IEclipseVariableQuery
astNode
- Must be a node that evaluates to a value (usually an
Expression
.
public SourceVariable sourceVariable(IVariableBinding binding)
IEclipseVariableQuery
sourceVariable
in interface IEclipseVariableQuery
binding
- Binding for a parameter or local variable.
public TypeVariable typeVariable(ITypeBinding binding)
IEclipseVariableQuery
typeVariable
in interface IEclipseVariableQuery
binding
- Type binding.
public ThisVariable thisVariable()
this
.
thisVariable
in interface IEclipseVariableQuery
this
.public ThisVariable implicitThisVariable(IBinding accessedElement)
IEclipseVariableQuery
implicitThisVariable
in interface IEclipseVariableQuery
accessedElement
- The element being accessed with an implicit this.
Must be a IMethodBinding
for a method or constructor
or a IVariableBinding
for a field.
public ITypeBinding resolveThisType()
this
, if any.
this
or null
if this is a static method.public static boolean isStaticBinding(IBinding binding)
public static boolean isDefaultBinding(IBinding binding)
public SuperVariable superVariable(Name qualifier)
IEclipseVariableQuery
superVariable
in interface IEclipseVariableQuery
qualifier
- Qualifier for super access; null
for unqualified super.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |