Constructors

Link copied to clipboard
constructor()
constructor(method: Method)
constructor(constructor: Constructor<*>)
constructor(descriptor: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Raw DEX access flags; no reflection normalization is applied.

----------------

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The method declared class fully qualified name.

----------------

Link copied to clipboard

The method descriptor.

----------------

Link copied to clipboard

Android Java reflection method modifiers, including hidden Java flag bits. Use java.lang.reflect.Modifier for reflection conditions. For raw DEX flags, use accessFlags with DexAccessFlags. The default match type is contains. If you need to match exactly, please use modifiers overloaded function.

Link copied to clipboard
Link copied to clipboard

The method name.

----------------

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

This method uses consecutive OP instructions.

----------------

Link copied to clipboard
Link copied to clipboard

This method uses consecutive smali instructions.

----------------

Link copied to clipboard

The method parameter count.

----------------

Link copied to clipboard
Link copied to clipboard

The method parameter types fully qualified name. If set to null, it means matching any parameter type. The list implies the number of parameters.

Link copied to clipboard

The method prototype shorty. The shorty is a string that represents the return type and parameter types of a method in a compact form. The first character represents the return type, and the rest represent parameter types.

Link copied to clipboard
Link copied to clipboard

The method return type fully qualified name.

----------------

Link copied to clipboard
Link copied to clipboard

Numbers used by this method. Integer queries compare signed values exactly. Floating queries interpret const instructions at their 32/64-bit width, with an absolute tolerance of less than 1e-6. Arithmetic literals are integer-only. Same-sign infinities and signed zeros compare equal; NaN never matches. This does not infer the original source-language type.

Link copied to clipboard

Using string list. Default match type is contains, if you need to match exactly, please use usingStrings or addUsingString overloaded function for each string.

Functions

Link copied to clipboard

Match raw DEX flags independently of modifiers. Both constraints may be combined.

----------------

fun accessFlags(accessFlags: Int, matchType: MatchType = MatchType.Contains): MethodMatcher

Match raw DEX access flags, including DEX-only flags from DexAccessFlags.

----------------

Link copied to clipboard

Add one child matcher that must also match.

----------------

Link copied to clipboard

Add method annotation matcher.

----------------

Link copied to clipboard

Add one child matcher where at least one must match.

----------------

Link copied to clipboard

fun addCaller(methodDescriptor: String): MethodMatcher

Adds a matcher for when this method is called by a specified method.

----------------

Link copied to clipboard
fun addEqString(usingString: String): MethodMatcher

Add using string(fuzzy match).

----------------

Link copied to clipboard

fun addInvoke(methodDescriptor: String): MethodMatcher

Add a matcher that calls the method corresponding to the descriptor.

----------------

This method calls the matcher for the specified method.

----------------

Link copied to clipboard

Add one child matcher that must not match.

----------------

Link copied to clipboard
fun addParamType(paramType: Class<*>?): MethodMatcher

Add method parameter type class matcher.

----------------


fun addParamType(paramType: String?, matchType: StringMatchType = StringMatchType.Equals, ignoreCase: Boolean = false): MethodMatcher

Add method parameter type fully qualified name. If set to null, it means matching any parameter type.

Link copied to clipboard

fun addUsingField(fieldDescriptor: String, usingType: UsingType = UsingType.Any): MethodMatcher
fun addUsingField(usingField: FieldMatcher, usingType: UsingType = UsingType.Any): MethodMatcher

Using fields matcher.

----------------

Link copied to clipboard

Add a number matcher using the integer/floating semantics described in usingNumbers.

----------------

Link copied to clipboard

Add using string matcher.

----------------

fun addUsingString(usingString: String, matchType: StringMatchType = StringMatchType.Contains, ignoreCase: Boolean = false): MethodMatcher

Add using string.

----------------

Link copied to clipboard
fun allOf(vararg matchers: MethodMatcher): MethodMatcher

Add child matchers that must all match.

----------------

Link copied to clipboard

Method annotation count.

----------------

fun annotationCount(min: Int = 0, max: Int = Int.MAX_VALUE): MethodMatcher

Method annotation count range.

----------------

Link copied to clipboard

The method annotations matcher.

----------------

Link copied to clipboard
fun anyOf(vararg matchers: MethodMatcher): MethodMatcher

Add child matchers where at least one must match.

----------------

Link copied to clipboard

The matcher for when this method is called by the specified set of methods.

----------------

Link copied to clipboard

The method declared class.

----------------


The method declared class matcher.

----------------

fun declaredClass(className: String, matchType: StringMatchType = StringMatchType.Equals, ignoreCase: Boolean = false): MethodMatcher

The method declared class fully qualified name.

----------------

Link copied to clipboard
fun descriptor(descriptor: String): MethodMatcher

The method descriptor, specifies a unique method.

----------------

Link copied to clipboard

This method calls the matcher for the specified methods set.

----------------

Link copied to clipboard

Java reflection method modifiers matcher.

----------------

fun modifiers(modifiers: Int, matchType: MatchType = MatchType.Contains): MethodMatcher

Android Java reflection method modifiers, including hidden Java flag bits. Use java.lang.reflect.Modifier for reflection conditions. For raw DEX flags, use accessFlags with DexAccessFlags.

Link copied to clipboard

The method name matcher

----------------

fun name(name: String, matchType: StringMatchType = StringMatchType.Equals, ignoreCase: Boolean = false): MethodMatcher

The method name.

----------------

Link copied to clipboard
fun noneOf(vararg matchers: MethodMatcher): MethodMatcher

Add child matchers that must not match.

----------------

Link copied to clipboard

Add a negated child matcher.

----------------

Link copied to clipboard

This method uses opcodes matcher

----------------

fun opCodes(opCodes: Collection<Int>, matchType: OpCodeMatchType = OpCodeMatchType.Contains, opCodeSize: IntRange? = null): MethodMatcher

This method uses consecutive OP instructions.

----------------

Link copied to clipboard
fun opNames(opNames: Collection<String>, matchType: OpCodeMatchType = OpCodeMatchType.Contains, opCodeSize: IntRange? = null): MethodMatcher

This method uses consecutive smali instructions.

----------------

Link copied to clipboard

The method parameter count.

----------------

fun paramCount(min: Int = 0, max: Int = Int.MAX_VALUE): MethodMatcher

The method parameter count range.

----------------

Link copied to clipboard

The method parameter types matcher.

----------------

Link copied to clipboard

empty parameters overload.

----------------

fun paramTypes(vararg paramTypes: Class<*>?): MethodMatcher

The method parameter types class matcher. If set to null, it means matching any parameter type. The list implies the number of parameters.

fun paramTypes(vararg paramTypes: String?): MethodMatcher

The method parameter types fully qualified name. If set to null, it means matching any parameter type. The list implies the number of parameters.

Link copied to clipboard

The method prototype shorty. The shorty is a string that represents the return type and parameter types of a method in a compact form. The first character represents the return type, and the rest represent parameter types.

Link copied to clipboard

The method return type.

----------------


The method return type matcher.

----------------

fun returnType(typeName: String, matchType: StringMatchType = StringMatchType.Equals, ignoreCase: Boolean = false): MethodMatcher

The method return type fully qualified name.

----------------

Link copied to clipboard
fun usingEqStrings(vararg usingStrings: String): MethodMatcher

Using strings matcher(fuzzy match).

----------------

Link copied to clipboard

Using fields matcher.

----------------

Link copied to clipboard
fun usingNumbers(vararg usingNumbers: Number): MethodMatcher

Match numbers using the integer/floating semantics described in usingNumbers.

----------------


Using numbers matcher.

----------------

Link copied to clipboard
fun usingStrings(vararg usingStrings: String): MethodMatcher

Using strings matcher. default match type is contains, if you need to match exactly, please use usingStrings or addUsingString overloaded function for each string.


fun usingStrings(usingStrings: Collection<String>, matchType: StringMatchType = StringMatchType.Contains, ignoreCase: Boolean = false): MethodMatcher

Using strings matcher.

----------------