public static class PatternMatcher.Builder
extends java.lang.Object
PatternMatcher
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PatternMatcher.Builder |
any()
Wildcard, matches any kind of node.
|
PatternMatcher |
build()
Builds the pattern defined so far.
|
PatternMatcher.Builder |
check(java.util.function.Predicate<org.objectweb.asm.tree.AbstractInsnNode> predicate)
Adds a custom predicate to the list.
|
PatternMatcher.Builder |
field()
Matches a field invokation of any kind: one of GETSTATIC, PUTSTATIC,
GETFIELD or PUTFIELD.
|
PatternMatcher.Builder |
ignoreFrames()
Tells the pattern matcher to ignore FRAME instructions.
|
PatternMatcher.Builder |
ignoreLabels()
Tells the pattern matcher to ignore LABEL instructions.
|
PatternMatcher.Builder |
ignoreLineNumbers()
Tells the pattern matcher to ignore LINENUMBER instructions.
|
PatternMatcher.Builder |
jump()
Matches any kind of jump instruction.
|
PatternMatcher.Builder |
label()
Matches any kind of label.
|
PatternMatcher.Builder |
method()
Matches a method invokation of any kind: one of INVOKEVIRTUAL,
INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE.
|
PatternMatcher.Builder |
opcode(int opcode)
Matches a specific opcode.
|
PatternMatcher.Builder |
opcodes(int... opcodes)
Matches a list of opcodes.
|
PatternMatcher.Builder |
reverse()
Sets the pattern to match starting from the end.
|
public PatternMatcher build()
PatternMatcher
public PatternMatcher.Builder reverse()
public PatternMatcher.Builder check(java.util.function.Predicate<org.objectweb.asm.tree.AbstractInsnNode> predicate)
predicate
- the predicate to addpublic PatternMatcher.Builder any()
public PatternMatcher.Builder opcode(int opcode)
opcode
- opcode to matchpublic PatternMatcher.Builder opcodes(int... opcodes)
opcodes
- list of opcodes to matchpublic PatternMatcher.Builder method()
public PatternMatcher.Builder field()
public PatternMatcher.Builder jump()
public PatternMatcher.Builder label()
public PatternMatcher.Builder ignoreLabels()
public PatternMatcher.Builder ignoreFrames()
public PatternMatcher.Builder ignoreLineNumbers()