|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.tac.model.Variable
edu.cmu.cs.crystal.tac.model.KeywordVariable
edu.cmu.cs.crystal.tac.model.ThisVariable
public class ThisVariable
This class represents the this
keyword, which is treated much like
any other variable.
For example, if the original Java source had code that was similar to the following:
a = this;
The right-hand side would be translated as a variable of this type.
Constructor Summary | |
---|---|
ThisVariable(EclipseTAC tac)
Creates an unqualified this variable. |
|
ThisVariable(EclipseTAC tac,
ITypeBinding typeBinding)
Creates an implicitly qualified this variable. |
|
ThisVariable(EclipseTAC tac,
Name qualifier)
Creates a qualified this variable. |
Method Summary | ||
---|---|---|
|
dispatch(IVariableVisitor<T> visitor)
|
|
void |
explicitQualifier(Name qualifier)
|
|
String |
getKeyword()
Which keyword does this variable represent? |
|
boolean |
isImplicit()
|
|
boolean |
isQualified()
Is this a standard keyword variable, or is it qualified? |
|
boolean |
isUnqualifiedThis()
|
|
ITypeBinding |
resolveType()
null or the type binding of this variable. |
Methods inherited from class edu.cmu.cs.crystal.tac.model.KeywordVariable |
---|
getQualifier, toString |
Methods inherited from class edu.cmu.cs.crystal.tac.model.Variable |
---|
getSourceString, isUnqualifiedSuper |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ThisVariable(EclipseTAC tac, ITypeBinding typeBinding)
tac
- typeBinding
- public ThisVariable(EclipseTAC tac)
tac
- public ThisVariable(EclipseTAC tac, Name qualifier)
tac
- qualifier
- Method Detail |
---|
public String getKeyword()
KeywordVariable
getKeyword
in class KeywordVariable
public boolean isQualified()
KeywordVariable
isQualified
in class KeywordVariable
public ITypeBinding resolveType()
Variable
null
or the type binding of this variable.
resolveType
in class Variable
Expression.resolveTypeBinding()
public boolean isImplicit()
public void explicitQualifier(Name qualifier)
public <T> T dispatch(IVariableVisitor<T> visitor)
dispatch
in class Variable
public boolean isUnqualifiedThis()
isUnqualifiedThis
in class Variable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |