public final class Expression extends Node implements java.lang.Cloneable, com.strobel.componentmodel.UserDataStore
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
ANY_OPERAND |
static int |
MYSTERY_OFFSET
a constant to indicate that no bytecode offset is known for an expression
|
| Constructor and Description |
|---|
Expression(AstCode code,
java.lang.Object operand,
int offset,
Expression... arguments) |
Expression(AstCode code,
java.lang.Object operand,
int offset,
java.util.List<Expression> arguments) |
| Modifier and Type | Method and Description |
|---|---|
Expression |
clone() |
boolean |
containsReferenceTo(Variable variable) |
java.util.List<Expression> |
getArguments() |
java.util.List<Label> |
getBranchTargets() |
java.util.List<Node> |
getChildren() |
AstCode |
getCode() |
TypeReference |
getExpectedType() |
TypeReference |
getInferredType() |
int |
getOffset()
Returns the bytecode offset for 'this' expression, as computed by the Java compiler.
|
java.lang.Object |
getOperand() |
java.util.List<Range> |
getRanges() |
<T> T |
getUserData(com.strobel.componentmodel.Key<T> key) |
boolean |
isBranch() |
boolean |
isEquivalentTo(Expression e) |
<T> void |
putUserData(com.strobel.componentmodel.Key<T> key,
T value) |
<T> T |
putUserDataIfAbsent(com.strobel.componentmodel.Key<T> key,
T value) |
<T> boolean |
replace(com.strobel.componentmodel.Key<T> key,
T oldValue,
T newValue) |
void |
setCode(AstCode code) |
void |
setExpectedType(TypeReference expectedType) |
void |
setInferredType(TypeReference inferredType) |
void |
setOperand(java.lang.Object operand) |
void |
writeTo(ITextOutput output) |
getChildrenAndSelfRecursive, getChildrenAndSelfRecursive, getChildrenAndSelfRecursive, getChildrenAndSelfRecursive, getSelfAndChildrenRecursive, getSelfAndChildrenRecursive, getSelfAndChildrenRecursive, getSelfAndChildrenRecursive, isConditionalControlFlow, isUnconditionalControlFlow, toStringpublic static final java.lang.Object ANY_OPERAND
public static final int MYSTERY_OFFSET
public Expression(AstCode code, java.lang.Object operand, int offset, java.util.List<Expression> arguments)
public Expression(AstCode code, java.lang.Object operand, int offset, Expression... arguments)
public final java.util.List<Expression> getArguments()
public final AstCode getCode()
public final void setCode(AstCode code)
public final java.lang.Object getOperand()
public final void setOperand(java.lang.Object operand)
public final int getOffset()
public final TypeReference getExpectedType()
public final void setExpectedType(TypeReference expectedType)
public final TypeReference getInferredType()
public final void setInferredType(TypeReference inferredType)
public final boolean isBranch()
public final java.util.List<Label> getBranchTargets()
public final java.util.List<Range> getRanges()
public final java.util.List<Node> getChildren()
getChildren in class Nodepublic final boolean containsReferenceTo(Variable variable)
public final void writeTo(ITextOutput output)
public final Expression clone()
clone in class java.lang.Objectpublic boolean isEquivalentTo(Expression e)
public <T> T getUserData(@NotNull
com.strobel.componentmodel.Key<T> key)
getUserData in interface com.strobel.componentmodel.UserDataStorepublic <T> void putUserData(@NotNull
com.strobel.componentmodel.Key<T> key,
@Nullable
T value)
putUserData in interface com.strobel.componentmodel.UserDataStorepublic <T> T putUserDataIfAbsent(@NotNull
com.strobel.componentmodel.Key<T> key,
@Nullable
T value)
putUserDataIfAbsent in interface com.strobel.componentmodel.UserDataStorepublic <T> boolean replace(@NotNull
com.strobel.componentmodel.Key<T> key,
@Nullable
T oldValue,
@Nullable
T newValue)
replace in interface com.strobel.componentmodel.UserDataStore