Class BooleanOperation
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.parse.expression.AbstractExpression
-
- org.benf.cfr.reader.bytecode.analysis.parse.expression.BooleanOperation
-
- All Implemented Interfaces:
HasByteCodeLoc,Expression,ConditionalExpression,DeepCloneable<Expression>,ComparableUnderEC,Dumpable,DumpableWithPrecedence,TypeUsageCollectable
public class BooleanOperation extends AbstractExpression implements ConditionalExpression
-
-
Field Summary
Fields Modifier and Type Field Description private ConditionalExpressionlhsprivate BoolOpopprivate ConditionalExpressionrhs
-
Constructor Summary
Constructors Constructor Description BooleanOperation(BytecodeLoc loc, ConditionalExpression lhs, ConditionalExpression rhs, BoolOp op)
-
Method Summary
-
Methods inherited from class org.benf.cfr.reader.bytecode.analysis.parse.expression.AbstractExpression
addLoc, canPushDownInto, canThrow, dump, dumpWithOuterPrecedence, getInferredJavaType, getLoc, isSimple, isValidStatement, outerDeepClone, pushDown, toString, visit
-
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
outerDeepClone
-
Methods inherited from interface org.benf.cfr.reader.util.output.DumpableWithPrecedence
dumpWithOuterPrecedence
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.parse.Expression
canPushDownInto, canThrow, dump, getInferredJavaType, isSimple, isValidStatement, pushDown, visit
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.loc.HasByteCodeLoc
addLoc, getLoc
-
-
-
-
Field Detail
-
lhs
private ConditionalExpression lhs
-
rhs
private ConditionalExpression rhs
-
op
private BoolOp op
-
-
Constructor Detail
-
BooleanOperation
public BooleanOperation(BytecodeLoc loc, ConditionalExpression lhs, ConditionalExpression rhs, BoolOp op)
-
-
Method Detail
-
deepClone
public Expression deepClone(CloneHelper cloneHelper)
- Specified by:
deepClonein interfaceDeepCloneable<Expression>
-
getCombinedLoc
public BytecodeLoc getCombinedLoc()
- Specified by:
getCombinedLocin interfaceHasByteCodeLoc
-
getLhs
public ConditionalExpression getLhs()
-
getRhs
public ConditionalExpression getRhs()
-
getOp
public BoolOp getOp()
-
collectTypeUsages
public void collectTypeUsages(TypeUsageCollector collector)
- Specified by:
collectTypeUsagesin interfaceTypeUsageCollectable- Overrides:
collectTypeUsagesin classAbstractExpression
-
getSize
public int getSize(Precedence outerPrecedence)
- Specified by:
getSizein interfaceConditionalExpression
-
replaceSingleUsageLValues
public Expression replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer)
- Specified by:
replaceSingleUsageLValuesin interfaceExpression
-
applyExpressionRewriter
public Expression applyExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
applyExpressionRewriterin interfaceExpression
-
applyReverseExpressionRewriter
public Expression applyReverseExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
applyReverseExpressionRewriterin interfaceExpression
-
applyLHSOnlyExpressionRewriter
public Expression applyLHSOnlyExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
-
getPrecedence
public Precedence getPrecedence()
- Specified by:
getPrecedencein interfaceDumpableWithPrecedence- Specified by:
getPrecedencein classAbstractExpression
-
dumpInner
public Dumper dumpInner(Dumper d)
- Specified by:
dumpInnerin classAbstractExpression
-
getNegated
public ConditionalExpression getNegated()
- Specified by:
getNegatedin interfaceConditionalExpression
-
getDemorganApplied
public ConditionalExpression getDemorganApplied(boolean amNegating)
- Specified by:
getDemorganAppliedin interfaceConditionalExpression
-
getRightDeep
public ConditionalExpression getRightDeep()
- Specified by:
getRightDeepin interfaceConditionalExpression
-
makeRightDeep
public static ConditionalExpression makeRightDeep(java.util.List<ConditionalExpression> c, BoolOp op)
-
getLoopLValues
public java.util.Set<LValue> getLoopLValues()
- Specified by:
getLoopLValuesin interfaceConditionalExpression
-
collectUsedLValues
public void collectUsedLValues(LValueUsageCollector lValueUsageCollector)
- Specified by:
collectUsedLValuesin interfaceExpression
-
optimiseForType
public ConditionalExpression optimiseForType()
- Specified by:
optimiseForTypein interfaceConditionalExpression
-
simplify
public ConditionalExpression simplify()
- Specified by:
simplifyin interfaceConditionalExpression
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin classAbstractExpression
-
equivalentUnder
public final boolean equivalentUnder(java.lang.Object o, EquivalenceConstraint constraint)- Specified by:
equivalentUnderin interfaceComparableUnderEC- Specified by:
equivalentUnderin interfaceExpression
-
getComputed
private static java.lang.Boolean getComputed(Expression e, java.util.Map<LValue,Literal> display)
-
getComputedLiteral
public Literal getComputedLiteral(java.util.Map<LValue,Literal> display)
- Specified by:
getComputedLiteralin interfaceExpression- Overrides:
getComputedLiteralin classAbstractExpression
-
-