Class AbstractExpression
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.parse.expression.AbstractExpression
-
- All Implemented Interfaces:
HasByteCodeLoc
,Expression
,DeepCloneable<Expression>
,ComparableUnderEC
,Dumpable
,DumpableWithPrecedence
,TypeUsageCollectable
- Direct Known Subclasses:
AbstractAssignmentExpression
,AbstractConstructorInvokation
,AbstractFunctionInvokation
,AbstractFunctionInvokationExplicit
,AbstractNewArray
,ArithmeticMonOperation
,ArithmeticOperation
,ArrayIndex
,ArrayLength
,BooleanExpression
,BooleanOperation
,CastExpression
,CommentStatement.StatementExpression
,ComparisonOperation
,DynamicConstExpression
,DynamicInvokation
,InstanceOfExpression
,InstanceOfExpressionDefining
,LambdaExpression
,LambdaExpressionFallback
,LambdaExpressionNewArray
,Literal
,LValueExpression
,MethodHandlePlaceholder
,NewObject
,NotOperation
,StackValue
,StructuredStatementExpression
,SwitchExpression
,TernaryExpression
public abstract class AbstractExpression extends java.lang.Object implements Expression
-
-
Field Summary
Fields Modifier and Type Field Description private InferredJavaType
inferredJavaType
private BytecodeLoc
loc
-
Constructor Summary
Constructors Constructor Description AbstractExpression(BytecodeLoc loc, InferredJavaType inferredJavaType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addLoc(HasByteCodeLoc loc)
boolean
canPushDownInto()
boolean
canThrow(ExceptionCheck caught)
void
collectTypeUsages(TypeUsageCollector collector)
Dumper
dump(Dumper d)
abstract Dumper
dumpInner(Dumper d)
Dumper
dumpWithOuterPrecedence(Dumper d, Precedence outerP, Troolean isLhs)
abstract boolean
equals(java.lang.Object o)
Literal
getComputedLiteral(java.util.Map<LValue,Literal> display)
InferredJavaType
getInferredJavaType()
BytecodeLoc
getLoc()
abstract Precedence
getPrecedence()
boolean
isSimple()
boolean
isValidStatement()
Expression
outerDeepClone(CloneHelper cloneHelper)
Expression
pushDown(Expression toPush, Expression parent)
java.lang.String
toString()
<T> T
visit(ExpressionVisitor<T> visitor)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.parse.rewriters.DeepCloneable
deepClone
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.parse.Expression
applyExpressionRewriter, applyReverseExpressionRewriter, collectUsedLValues, equivalentUnder, replaceSingleUsageLValues
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.loc.HasByteCodeLoc
getCombinedLoc
-
-
-
-
Field Detail
-
loc
private BytecodeLoc loc
-
inferredJavaType
private final InferredJavaType inferredJavaType
-
-
Constructor Detail
-
AbstractExpression
public AbstractExpression(BytecodeLoc loc, InferredJavaType inferredJavaType)
-
-
Method Detail
-
addLoc
public void addLoc(HasByteCodeLoc loc)
- Specified by:
addLoc
in interfaceHasByteCodeLoc
-
collectTypeUsages
public void collectTypeUsages(TypeUsageCollector collector)
- Specified by:
collectTypeUsages
in interfaceTypeUsageCollectable
-
getLoc
public BytecodeLoc getLoc()
- Specified by:
getLoc
in interfaceHasByteCodeLoc
-
canPushDownInto
public boolean canPushDownInto()
- Specified by:
canPushDownInto
in interfaceExpression
-
isSimple
public boolean isSimple()
- Specified by:
isSimple
in interfaceExpression
-
pushDown
public Expression pushDown(Expression toPush, Expression parent)
- Specified by:
pushDown
in interfaceExpression
-
getInferredJavaType
public InferredJavaType getInferredJavaType()
- Specified by:
getInferredJavaType
in interfaceExpression
-
outerDeepClone
public Expression outerDeepClone(CloneHelper cloneHelper)
- Specified by:
outerDeepClone
in interfaceDeepCloneable<Expression>
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
canThrow
public boolean canThrow(ExceptionCheck caught)
- Specified by:
canThrow
in interfaceExpression
-
equals
public abstract boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
getComputedLiteral
public Literal getComputedLiteral(java.util.Map<LValue,Literal> display)
- Specified by:
getComputedLiteral
in interfaceExpression
-
isValidStatement
public boolean isValidStatement()
- Specified by:
isValidStatement
in interfaceExpression
-
dump
public final Dumper dump(Dumper d)
- Specified by:
dump
in interfaceDumpable
- Specified by:
dump
in interfaceExpression
-
getPrecedence
public abstract Precedence getPrecedence()
- Specified by:
getPrecedence
in interfaceDumpableWithPrecedence
-
visit
public <T> T visit(ExpressionVisitor<T> visitor)
- Specified by:
visit
in interfaceExpression
-
dumpWithOuterPrecedence
public final Dumper dumpWithOuterPrecedence(Dumper d, Precedence outerP, Troolean isLhs)
- Specified by:
dumpWithOuterPrecedence
in interfaceDumpableWithPrecedence
-
-