Class PatternMatching
java.lang.Object
com.strobel.decompiler.ast.PatternMatching
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanmatchAssignment(Node node, StrongBox<Expression> assignedValue) static booleanmatchAssignment(Node node, StrongBox<Expression> assignedValue, StrongBox<Expression> equivalentLoad) static booleanmatchAssignmentAndConditionalBreak(BasicBlock block, StrongBox<Expression> assignedValue, StrongBox<Expression> condition, StrongBox<Label> trueLabel, StrongBox<Label> falseLabel, StrongBox<Expression> equivalentLoad) static booleanmatchBooleanComparison(Node node, StrongBox<Expression> argument, StrongBox<Boolean> comparand) static BooleanmatchBooleanConstant(Node node) static booleanmatchBooleanConstant(Node node, Consumer<? super Boolean> value) static CharactermatchCharacterConstant(Node node) static booleanmatchCharacterConstant(Node node, Consumer<? super Character> value) static booleanmatchComparison(Node node, StrongBox<Expression> left, StrongBox<Expression> right) private static booleanmatchElementAssignment(Node node, StrongBox<Expression> assignedValue, StrongBox<Expression> equivalentLoad) static booleanmatchEmptyBlockOrLeave(Node node) static booleanmatchEmptyReturn(Node node) static BooleanmatchFalse(Node node) static <T> booleanmatchGetArgument(Node node, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) static booleanmatchGetArgument(Node node, AstCode code, StrongBox<Expression> argument) static <T> booleanmatchGetArguments(Node node, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument1, StrongBox<Expression> argument2) static <T> booleanmatchGetArguments(Node node, AstCode code, StrongBox<? super T> operand, List<Expression> arguments) static booleanmatchGetArguments(Node node, AstCode code, List<Expression> arguments) static <T> booleanmatchGetOperand(Node node, AstCode code, Consumer<? super T> operand) static <T> booleanmatchGetOperand(Node node, AstCode code, Class<T> operandType, StrongBox<? super T> operand) static booleanmatchIntegralConstant(Node node, Consumer<? super Long> constant) static booleanmatchLast(BasicBlock block, AstCode code) static <T> booleanmatchLast(BasicBlock block, AstCode code, StrongBox<? super T> operand) static <T> booleanmatchLast(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) static booleanstatic <T> booleanstatic <T> booleanprivate static <T> booleanmatchLast(List<Node> body, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) static <T> booleanmatchLastAndBreak(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument, StrongBox<Label> label) static booleanmatchLeaveHandler(Node node) static booleanstatic booleanstatic booleanstatic booleanmatchLoad(Node node, Variable expectedVariable, StrongBox<Expression> argument) static booleanstatic booleanmatchLoadAny(Node node, Iterable<Variable> expectedVariables) static booleanmatchLoadOrRet(Node node, StrongBox<Variable> variable) static booleanmatchLoadStore(Node node, Variable expectedVariable, StrongBox<Variable> targetVariable) static booleanmatchLoadStoreAny(Node node, Iterable<Variable> expectedVariables, StrongBox<Variable> targetVariable) static booleanstatic booleanmatchNullOrEmpty(Block block) static booleanmatchNumericConstant(Node node, Consumer<? super Number> constant) static booleanmatchNumericLdC(Node node, StrongBox<? super Number> value) static booleanmatchReturnOrThrow(Node node) static booleanstatic booleanmatchSimpleBreak(BasicBlock block, StrongBox<Label> label) static booleanmatchSimpleBreak(BasicBlock block, Label label) static booleanstatic <T> booleanmatchSingle(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) static <T> booleanmatchSingle(Block block, AstCode code, StrongBox<? super T> operand) static <T> booleanmatchSingle(Block block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) static <T> booleanmatchSingleAndBreak(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument, StrongBox<Label> label) static booleanmatchStore(Node node, StrongBox<Variable> variable, StrongBox<Expression> argument) static booleanmatchStore(Node node, StrongBox<Variable> variable, List<Expression> argument) static booleanmatchStore(Node node, Variable expectedVariable) static booleanmatchStore(Node node, Variable expectedVariable, StrongBox<Expression> value) static booleanstatic Booleanstatic booleanmatchUnconditionalBranch(Node node) static booleanmatchUnlock(Node e, LockInfo lockInfo) static booleanmatchVariableIncDec(Node node, StrongBox<Variable> variable) static booleanstatic booleanmatchVariableMutation(Node node, Variable variable)
-
Constructor Details
-
PatternMatching
private PatternMatching()
-
-
Method Details
-
match
-
matchLeaveHandler
-
matchGetOperand
-
matchGetOperand
-
matchGetArguments
-
matchGetArguments
public static <T> boolean matchGetArguments(Node node, AstCode code, StrongBox<? super T> operand, List<Expression> arguments) -
matchGetArgument
-
matchGetArgument
public static <T> boolean matchGetArgument(Node node, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) -
matchGetArguments
public static <T> boolean matchGetArguments(Node node, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument1, StrongBox<Expression> argument2) -
matchSingle
-
matchSingle
public static <T> boolean matchSingle(Block block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) -
matchNullOrEmpty
-
matchEmptyReturn
-
matchEmptyBlockOrLeave
-
matchSingle
public static <T> boolean matchSingle(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) -
matchSingleAndBreak
public static <T> boolean matchSingleAndBreak(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument, StrongBox<Label> label) -
matchSimpleBreak
-
matchSimpleBreak
-
matchAssignmentAndConditionalBreak
public static boolean matchAssignmentAndConditionalBreak(BasicBlock block, StrongBox<Expression> assignedValue, StrongBox<Expression> condition, StrongBox<Label> trueLabel, StrongBox<Label> falseLabel, StrongBox<Expression> equivalentLoad) -
matchAssignment
-
matchAssignment
public static boolean matchAssignment(Node node, StrongBox<Expression> assignedValue, StrongBox<Expression> equivalentLoad) -
matchElementAssignment
private static boolean matchElementAssignment(Node node, StrongBox<Expression> assignedValue, StrongBox<Expression> equivalentLoad) -
matchLast
-
matchLast
-
matchLast
-
matchLast
-
matchLast
public static <T> boolean matchLast(Block block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) -
matchLast
public static <T> boolean matchLast(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument) -
matchLast
-
matchLastAndBreak
public static <T> boolean matchLastAndBreak(BasicBlock block, AstCode code, StrongBox<? super T> operand, StrongBox<Expression> argument, StrongBox<Label> label) -
matchThis
-
matchLoadAny
-
matchLoad
-
matchNumericLdC
-
matchVariableIncDec
-
matchVariableIncDec
-
matchStore
public static boolean matchStore(Node node, StrongBox<Variable> variable, StrongBox<Expression> argument) -
matchStore
public static boolean matchStore(Node node, StrongBox<Variable> variable, List<Expression> argument) -
matchLoadOrRet
-
matchLoad
-
matchStore
-
matchStore
-
matchLoad
public static boolean matchLoad(Node node, Variable expectedVariable, StrongBox<Expression> argument) -
matchLoadStore
-
matchLoadStoreAny
-
matchBooleanComparison
public static boolean matchBooleanComparison(Node node, StrongBox<Expression> argument, StrongBox<Boolean> comparand) -
matchComparison
public static boolean matchComparison(Node node, StrongBox<Expression> left, StrongBox<Expression> right) -
matchSimplifiableComparison
-
matchReversibleComparison
-
matchReturnOrThrow
-
matchTrue
-
matchFalse
-
matchIntegralConstant
-
matchNumericConstant
-
matchLoad
-
matchLoad
-
matchBooleanConstant
-
matchCharacterConstant
-
matchBooleanConstant
-
matchCharacterConstant
-
matchUnconditionalBranch
-
matchLock
-
matchUnlock
-
matchVariableMutation
-