public final class PatternMatching
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
match(Node node,
AstCode code) |
static boolean |
matchAssignment(Node node,
com.strobel.core.StrongBox<Expression> assignedValue) |
static boolean |
matchAssignment(Node node,
com.strobel.core.StrongBox<Expression> assignedValue,
com.strobel.core.StrongBox<Expression> equivalentLoad) |
static boolean |
matchAssignmentAndConditionalBreak(BasicBlock block,
com.strobel.core.StrongBox<Expression> assignedValue,
com.strobel.core.StrongBox<Expression> condition,
com.strobel.core.StrongBox<Label> trueLabel,
com.strobel.core.StrongBox<Label> falseLabel,
com.strobel.core.StrongBox<Expression> equivalentLoad) |
static boolean |
matchBooleanComparison(Node node,
com.strobel.core.StrongBox<Expression> argument,
com.strobel.core.StrongBox<java.lang.Boolean> comparand) |
static java.lang.Boolean |
matchBooleanConstant(Node node) |
static boolean |
matchBooleanConstant(Node node,
com.strobel.core.StrongBox<java.lang.Boolean> value) |
static java.lang.Character |
matchCharacterConstant(Node node) |
static boolean |
matchCharacterConstant(Node node,
com.strobel.core.StrongBox<java.lang.Character> value) |
static boolean |
matchComparison(Node node,
com.strobel.core.StrongBox<Expression> left,
com.strobel.core.StrongBox<Expression> right) |
static boolean |
matchEmptyReturn(Node node) |
static java.lang.Boolean |
matchFalse(Node node) |
static <T> boolean |
matchGetArgument(Node node,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument) |
static boolean |
matchGetArgument(Node node,
AstCode code,
com.strobel.core.StrongBox<Expression> argument) |
static boolean |
matchGetArguments(Node node,
AstCode code,
java.util.List<Expression> arguments) |
static <T> boolean |
matchGetArguments(Node node,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
java.util.List<Expression> arguments) |
static <T> boolean |
matchGetArguments(Node node,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument1,
com.strobel.core.StrongBox<Expression> argument2) |
static <T> boolean |
matchGetOperand(Node node,
AstCode code,
java.lang.Class<T> operandType,
com.strobel.core.StrongBox<? super T> operand) |
static <T> boolean |
matchGetOperand(Node node,
AstCode code,
com.strobel.core.StrongBox<? super T> operand) |
static boolean |
matchLast(BasicBlock block,
AstCode code) |
static <T> boolean |
matchLast(BasicBlock block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand) |
static <T> boolean |
matchLast(BasicBlock block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument) |
static boolean |
matchLast(Block block,
AstCode code) |
static <T> boolean |
matchLast(Block block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand) |
static <T> boolean |
matchLast(Block block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument) |
static <T> boolean |
matchLastAndBreak(BasicBlock block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument,
com.strobel.core.StrongBox<Label> label) |
static boolean |
matchLeaveHandler(Node node) |
static boolean |
matchLoad(Node node,
com.strobel.core.StrongBox<Variable> variable) |
static boolean |
matchLoad(Node node,
Variable expectedVariable) |
static boolean |
matchLoad(Node node,
Variable expectedVariable,
com.strobel.core.StrongBox<Expression> argument) |
static boolean |
matchLoadAny(Node node,
java.lang.Iterable<Variable> expectedVariables) |
static boolean |
matchLoadOrRet(Node node,
com.strobel.core.StrongBox<Variable> variable) |
static boolean |
matchLoadStore(Node node,
Variable expectedVariable,
com.strobel.core.StrongBox<Variable> targetVariable) |
static boolean |
matchLoadStoreAny(Node node,
java.lang.Iterable<Variable> expectedVariables,
com.strobel.core.StrongBox<Variable> targetVariable) |
static boolean |
matchLock(java.util.List<Node> body,
int position,
com.strobel.core.StrongBox<com.strobel.decompiler.ast.LockInfo> result) |
static boolean |
matchNullOrEmpty(Block block) |
static boolean |
matchReturnOrThrow(Node node) |
static boolean |
matchReversibleComparison(Node node) |
static boolean |
matchSimpleBreak(BasicBlock block,
Label label) |
static boolean |
matchSimpleBreak(BasicBlock block,
com.strobel.core.StrongBox<Label> label) |
static boolean |
matchSimplifiableComparison(Node node) |
static <T> boolean |
matchSingle(BasicBlock block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument) |
static <T> boolean |
matchSingle(Block block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand) |
static <T> boolean |
matchSingle(Block block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument) |
static <T> boolean |
matchSingleAndBreak(BasicBlock block,
AstCode code,
com.strobel.core.StrongBox<? super T> operand,
com.strobel.core.StrongBox<Expression> argument,
com.strobel.core.StrongBox<Label> label) |
static boolean |
matchStore(Node node,
com.strobel.core.StrongBox<Variable> variable,
java.util.List<Expression> argument) |
static boolean |
matchStore(Node node,
com.strobel.core.StrongBox<Variable> variable,
com.strobel.core.StrongBox<Expression> argument) |
static boolean |
matchStore(Node node,
Variable expectedVariable) |
static boolean |
matchStore(Node node,
Variable expectedVariable,
com.strobel.core.StrongBox<Expression> value) |
static boolean |
matchThis(Node node) |
static java.lang.Boolean |
matchTrue(Node node) |
static boolean |
matchUnconditionalBranch(Node node) |
static boolean |
matchUnlock(Node e,
com.strobel.decompiler.ast.LockInfo lockInfo) |
static boolean |
matchVariableMutation(Node node,
Variable variable) |
public static boolean matchLeaveHandler(Node node)
public static <T> boolean matchGetOperand(Node node, AstCode code, com.strobel.core.StrongBox<? super T> operand)
public static <T> boolean matchGetOperand(Node node, AstCode code, java.lang.Class<T> operandType, com.strobel.core.StrongBox<? super T> operand)
public static boolean matchGetArguments(Node node, AstCode code, java.util.List<Expression> arguments)
public static <T> boolean matchGetArguments(Node node, AstCode code, com.strobel.core.StrongBox<? super T> operand, java.util.List<Expression> arguments)
public static boolean matchGetArgument(Node node, AstCode code, com.strobel.core.StrongBox<Expression> argument)
public static <T> boolean matchGetArgument(Node node, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument)
public static <T> boolean matchGetArguments(Node node, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument1, com.strobel.core.StrongBox<Expression> argument2)
public static <T> boolean matchSingle(Block block, AstCode code, com.strobel.core.StrongBox<? super T> operand)
public static <T> boolean matchSingle(Block block, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument)
public static boolean matchNullOrEmpty(Block block)
public static boolean matchEmptyReturn(Node node)
public static <T> boolean matchSingle(BasicBlock block, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument)
public static <T> boolean matchSingleAndBreak(BasicBlock block, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument, com.strobel.core.StrongBox<Label> label)
public static boolean matchSimpleBreak(BasicBlock block, com.strobel.core.StrongBox<Label> label)
public static boolean matchSimpleBreak(BasicBlock block, Label label)
public static boolean matchAssignmentAndConditionalBreak(BasicBlock block, com.strobel.core.StrongBox<Expression> assignedValue, com.strobel.core.StrongBox<Expression> condition, com.strobel.core.StrongBox<Label> trueLabel, com.strobel.core.StrongBox<Label> falseLabel, com.strobel.core.StrongBox<Expression> equivalentLoad)
public static boolean matchAssignment(Node node, com.strobel.core.StrongBox<Expression> assignedValue)
public static boolean matchAssignment(Node node, com.strobel.core.StrongBox<Expression> assignedValue, com.strobel.core.StrongBox<Expression> equivalentLoad)
public static boolean matchLast(BasicBlock block, AstCode code)
public static <T> boolean matchLast(BasicBlock block, AstCode code, com.strobel.core.StrongBox<? super T> operand)
public static <T> boolean matchLast(Block block, AstCode code, com.strobel.core.StrongBox<? super T> operand)
public static <T> boolean matchLast(Block block, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument)
public static <T> boolean matchLast(BasicBlock block, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument)
public static <T> boolean matchLastAndBreak(BasicBlock block, AstCode code, com.strobel.core.StrongBox<? super T> operand, com.strobel.core.StrongBox<Expression> argument, com.strobel.core.StrongBox<Label> label)
public static boolean matchThis(Node node)
public static boolean matchLoadAny(Node node, java.lang.Iterable<Variable> expectedVariables)
public static boolean matchStore(Node node, com.strobel.core.StrongBox<Variable> variable, com.strobel.core.StrongBox<Expression> argument)
public static boolean matchStore(Node node, com.strobel.core.StrongBox<Variable> variable, java.util.List<Expression> argument)
public static boolean matchLoadOrRet(Node node, com.strobel.core.StrongBox<Variable> variable)
public static boolean matchStore(Node node, Variable expectedVariable, com.strobel.core.StrongBox<Expression> value)
public static boolean matchLoad(Node node, Variable expectedVariable, com.strobel.core.StrongBox<Expression> argument)
public static boolean matchLoadStore(Node node, Variable expectedVariable, com.strobel.core.StrongBox<Variable> targetVariable)
public static boolean matchLoadStoreAny(Node node, java.lang.Iterable<Variable> expectedVariables, com.strobel.core.StrongBox<Variable> targetVariable)
public static boolean matchBooleanComparison(Node node, com.strobel.core.StrongBox<Expression> argument, com.strobel.core.StrongBox<java.lang.Boolean> comparand)
public static boolean matchComparison(Node node, com.strobel.core.StrongBox<Expression> left, com.strobel.core.StrongBox<Expression> right)
public static boolean matchSimplifiableComparison(Node node)
public static boolean matchReversibleComparison(Node node)
public static boolean matchReturnOrThrow(Node node)
public static java.lang.Boolean matchTrue(Node node)
public static java.lang.Boolean matchFalse(Node node)
public static java.lang.Boolean matchBooleanConstant(Node node)
public static java.lang.Character matchCharacterConstant(Node node)
public static boolean matchBooleanConstant(Node node, com.strobel.core.StrongBox<java.lang.Boolean> value)
public static boolean matchCharacterConstant(Node node, com.strobel.core.StrongBox<java.lang.Character> value)
public static boolean matchUnconditionalBranch(Node node)
public static boolean matchLock(java.util.List<Node> body, int position, com.strobel.core.StrongBox<com.strobel.decompiler.ast.LockInfo> result)
public static boolean matchUnlock(Node e, com.strobel.decompiler.ast.LockInfo lockInfo)