Package com.strobel.decompiler.ast
Class Expression
- java.lang.Object
-
- com.strobel.decompiler.ast.Node
-
- com.strobel.decompiler.ast.Expression
-
- All Implemented Interfaces:
UserDataStore
,java.lang.Cloneable
public final class Expression extends Node implements java.lang.Cloneable, UserDataStore
-
-
Field Summary
Fields Modifier and Type Field Description private SmartList<Expression>
_arguments
private AstCode
_code
private TypeReference
_expectedType
private TypeReference
_inferredType
private int
_offset
the offset of 'this' Expression, as computed for its bytecode by the Java compilerprivate java.lang.Object
_operand
private SmartList<Range>
_ranges
private UserDataStoreBase
_userData
static java.lang.Object
ANY_OPERAND
static int
MYSTERY_OFFSET
a constant to indicate that no bytecode offset is known for an expression
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(Key<T> key)
boolean
isBranch()
boolean
isEquivalentTo(Expression e)
<T> void
putUserData(Key<T> key, T value)
<T> T
putUserDataIfAbsent(Key<T> key, T value)
<T> boolean
replace(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)
-
Methods inherited from class com.strobel.decompiler.ast.Node
getChildrenAndSelfRecursive, getChildrenAndSelfRecursive, getChildrenAndSelfRecursive, getChildrenAndSelfRecursive, getChildrenAndSelfRecursive, getSelfAndChildrenRecursive, getSelfAndChildrenRecursive, getSelfAndChildrenRecursive, getSelfAndChildrenRecursive, getSelfAndChildrenRecursive, isConditionalControlFlow, isUnconditionalControlFlow, toString
-
-
-
-
Field Detail
-
ANY_OPERAND
public static final java.lang.Object ANY_OPERAND
-
MYSTERY_OFFSET
public static final int MYSTERY_OFFSET
a constant to indicate that no bytecode offset is known for an expression- See Also:
- Constant Field Values
-
_arguments
private final SmartList<Expression> _arguments
-
_code
private AstCode _code
-
_operand
private java.lang.Object _operand
-
_offset
private int _offset
the offset of 'this' Expression, as computed for its bytecode by the Java compiler
-
_expectedType
private TypeReference _expectedType
-
_inferredType
private TypeReference _inferredType
-
_userData
private UserDataStoreBase _userData
-
-
Constructor Detail
-
Expression
public Expression(AstCode code, java.lang.Object operand, int offset, java.util.List<Expression> arguments)
-
Expression
public Expression(AstCode code, java.lang.Object operand, int offset, Expression... arguments)
-
-
Method Detail
-
getArguments
public final java.util.List<Expression> getArguments()
-
getCode
public final AstCode getCode()
-
setCode
public final void setCode(AstCode code)
-
getOperand
public final java.lang.Object getOperand()
-
setOperand
public final void setOperand(java.lang.Object operand)
-
getOffset
public final int getOffset()
Returns the bytecode offset for 'this' expression, as computed by the Java compiler.
-
getExpectedType
public final TypeReference getExpectedType()
-
setExpectedType
public final void setExpectedType(TypeReference expectedType)
-
getInferredType
public final TypeReference getInferredType()
-
setInferredType
public final void setInferredType(TypeReference inferredType)
-
isBranch
public final boolean isBranch()
-
getBranchTargets
public final java.util.List<Label> getBranchTargets()
-
getRanges
public final java.util.List<Range> getRanges()
-
getChildren
public final java.util.List<Node> getChildren()
- Overrides:
getChildren
in classNode
-
containsReferenceTo
public final boolean containsReferenceTo(Variable variable)
-
writeTo
public final void writeTo(ITextOutput output)
-
clone
public final Expression clone()
- Overrides:
clone
in classjava.lang.Object
-
isEquivalentTo
public boolean isEquivalentTo(Expression e)
-
getUserData
public <T> T getUserData(@NotNull Key<T> key)
- Specified by:
getUserData
in interfaceUserDataStore
-
putUserData
public <T> void putUserData(@NotNull Key<T> key, @Nullable T value)
- Specified by:
putUserData
in interfaceUserDataStore
-
putUserDataIfAbsent
public <T> T putUserDataIfAbsent(@NotNull Key<T> key, @Nullable T value)
- Specified by:
putUserDataIfAbsent
in interfaceUserDataStore
-
-