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>_argumentsprivate AstCode_codeprivate TypeReference_expectedTypeprivate TypeReference_inferredTypeprivate int_offsetthe offset of 'this' Expression, as computed for its bytecode by the Java compilerprivate java.lang.Object_operandprivate SmartList<Range>_rangesprivate UserDataStoreBase_userDatastatic java.lang.ObjectANY_OPERANDstatic intMYSTERY_OFFSETa 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 Expressionclone()booleancontainsReferenceTo(Variable variable)java.util.List<Expression>getArguments()java.util.List<Label>getBranchTargets()java.util.List<Node>getChildren()AstCodegetCode()TypeReferencegetExpectedType()TypeReferencegetInferredType()intgetOffset()Returns the bytecode offset for 'this' expression, as computed by the Java compiler.java.lang.ObjectgetOperand()java.util.List<Range>getRanges()<T> TgetUserData(Key<T> key)booleanisBranch()booleanisEquivalentTo(Expression e)<T> voidputUserData(Key<T> key, T value)<T> TputUserDataIfAbsent(Key<T> key, T value)<T> booleanreplace(Key<T> key, T oldValue, T newValue)voidsetCode(AstCode code)voidsetExpectedType(TypeReference expectedType)voidsetInferredType(TypeReference inferredType)voidsetOperand(java.lang.Object operand)voidwriteTo(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:
getChildrenin classNode
-
containsReferenceTo
public final boolean containsReferenceTo(Variable variable)
-
writeTo
public final void writeTo(ITextOutput output)
-
clone
public final Expression clone()
- Overrides:
clonein classjava.lang.Object
-
isEquivalentTo
public boolean isEquivalentTo(Expression e)
-
getUserData
public <T> T getUserData(@NotNull Key<T> key)
- Specified by:
getUserDatain interfaceUserDataStore
-
putUserData
public <T> void putUserData(@NotNull Key<T> key, @Nullable T value)
- Specified by:
putUserDatain interfaceUserDataStore
-
putUserDataIfAbsent
public <T> T putUserDataIfAbsent(@NotNull Key<T> key, @Nullable T value)
- Specified by:
putUserDataIfAbsentin interfaceUserDataStore
-
-