Quick Reference Guide This section introduces the structure components of DexKit queries. Matcher objects can be recursively nested, and all conditions are optional.
FindClass Field Name Type Description searchPackages Collection<String> List of package names to search excludePackages Collection<String> List of excluded package names ignorePackagesCase Boolean Whether to ignore package name case searchIn Collection<ClassData> Search for classes in the specified list of classes findFirst Boolean Return the first result found immediately; results are not guaranteed to be unique due to multi-threading matcher ClassMatcher Matching conditions
FindField Field Name Type Description searchPackages Collection<String> List of package names to search excludePackages Collection<String> List of excluded package names ignorePackagesCase Boolean Whether to ignore package name case searchInClasses Collection<ClassData> Search for fields in the specified list of classes searchInFields Collection<FieldData> Search for fields in the specified list of fields findFirst Boolean Return the first result found immediately; results are not guaranteed to be unique due to multi-threading matcher FieldMatcher Matching conditions
FindMethod Field Name Type Description searchPackages Collection<String> List of package names to search excludePackages Collection<String> List of excluded package names ignorePackagesCase Boolean Whether to ignore package name case searchInClasses Collection<ClassData> Search for methods in the specified list of classes searchInMethods Collection<MethodData> Search for methods in the specified list of methods findFirst Boolean Return the first result found immediately; results are not guaranteed to be unique due to multi-threading matcher MethodMatcher Matching conditions
BatchFindClassUsingStrings Field Name Type Description searchPackages Collection<String> List of package names to search excludePackages Collection<String> List of excluded package names ignorePackagesCase Boolean Whether to ignore package name case searchIn Collection<ClassData> Search for classes in the specified list of classes matchers Collection<StringMatchersGroup > List of query groups using strings
BatchFindMethodUsingStrings Field Name Type Description searchPackages Collection<String> List of package names to search excludePackages Collection<String> List of excluded package names ignorePackagesCase Boolean Whether to ignore package name case searchInClasses Collection<ClassData> Search for methods in the specified list of classes searchInMethods Collection<MethodData> Search for methods in the specified list of methods matchers Collection<StringMatchersGroup > List of query groups using strings
AccessFlagsMatcher Field Name Type Description modifiers Int Bit masks for matching modifiers matchType MatchType Matching mode
AnnotationEncodeValueMatcher Field Name Type Description byteValue Byte Matched byte shortValue Short Matched short integer charValue Char Matched character intValue Int Matched integer longValue Long Matched long integer floatValue Float Matched float doubleValue Double Matched double precision float stringValue StringMatcher Matched string methodValue MethodMatcher Matched method enumValue FieldMatcher Matched enumeration arrayValue AnnotationEncodeArrayMatcher Matched array annotationValue AnnotationMatcher Matched annotation nullValue None Match null boolValue Boolean Matched boolean
IntRange Field Name Type Description min Int Minimum value, default is 0 max Int Maximum value, default is Int.MAX_VALUE
NumberEncodeValueMatcher Field Name Type Description byteValue Byte Matched byte shortValue Short Matched short integer charValue Char Matched character intValue Int Matched integer longValue Long Matched long integer floatValue Float Matched float doubleValue Double Matched double precision float
OpcodesMatcher Field Name Type Description opCodes Collection<Int> Matched Int values of opcodes opNames Collection<String> Matched names of opcodes (as per smali syntax) matchType OpCodeMatchType Matching mode size IntRange Total length range of the opcode
StringMatcher Field Name Type Description value String Matched string matchType StringMatchType Matching mode ignoreCase Boolean Ignore case sensitivity
TargetElementTypesMatcher Field Name Type Description types Collection<TargetElementType > List of matched annotation element types matchType MatchType Matching mode
AnnotationElementMatcher AnnotationElementsMatcher AnnotationEncodeArrayMatcher AnnotationMatcher AnnotationsMatcher ClassMatcher InterfacesMatcher Field Name Type Description interfaces Collection<ClassMatcher > List of matched interfaces matchType MatchType Matching mode count IntRange Number of matched interfaces
FieldMatcher FieldsMatcher Field Name Type Description fields Collection<FieldMatcher > List of matched fields matchType MatchType Matching mode count IntRange Number of matched fields
MethodMatcher Tips
not { ... } is DSL syntax sugar rather than a standalone field; it is converted into adding one child matcher to noneOf. allOf, anyOf, and noneOf can be nested recursively.
MethodsMatcher ParameterMatcher ParametersMatcher Field Name Type Description params Collection<ParameterMatcher > List of matched parameters count IntRange Number of matched parameters
StringMatchersGroup Field Name Type Description groupName String Group name for the query matchers Collection<StringMatcher > List of strings used in the query
UsingFieldMatcher EncodeValueByte Field Name Type Description value Byte byte value
EncodeValueShort Field Name Type Description value Short short integer value
EncodeValueChar Field Name Type Description value Char character value
EncodeValueInt Field Name Type Description value Int integer value
EncodeValueLong Field Name Type Description value Long long integer value
EncodeValueFloat Field Name Type Description value Float float value
EncodeValueDouble Field Name Type Description value Double double value
EncodeValueString Field Name Type Description value String string value
EncodeValueNull This object has no fields.
EncodeValueBoolean Field Name Type Description value Boolean boolean value
Enumerations AnnotationEncodeValueType Field Name Type Description ByteValue Enum Byte type ShortValue Enum Short integer type CharValue Enum Character type IntValue Enum Integer type LongValue Enum Long integer type FloatValue Enum Float type DoubleValue Enum Double precision float type StringValue Enum String type TypeValue Enum Type type MethodValue Enum Method type EnumValue Enum Enum type ArrayValue Enum Array type AnnotationValue Enum Annotation type NullValue Enum Null type BoolValue Enum Boolean type
AnnotationVisibilityType Refer to Visibility valuesopen in new window
Field Name Type Description Build Enum Visible at build time Runtime Enum Visible at runtime System Enum Visible to the system
MatchType Field Name Type Description Contains Enum Contains Equals Enum Equals
NumberEncodeValueType Field Name Type Description ByteValue Enum Byte type ShortValue Enum Short integer type CharValue Enum Character type IntValue Enum Integer type LongValue Enum Long integer type FloatValue Enum Float type DoubleValue Enum Double precision float type
OpCodeMatchType Field Name Type Description Contains Enum Contains StartsWith Enum Starts with EndsWith Enum Ends with Equals Enum Equals
RetentionPolicyType This Enum corresponds to java.lang.annotation.RetentionPolicy.
Field Name Type Description Source Enum Source level Class Enum Class level Runtime Enum Runtime level
StringMatchType Field Name Type Description Contains Enum Contains StartsWith Enum Starts with EndsWith Enum Ends with SimilarRegex Enum Regex-like pattern, supporting only ^ and $ Equals Enum Equals
TargetElementType This Enum corresponds to java.lang.annotation.ElementType.
Field Name Type Description Type Enum Type Field Enum Field Method Enum Method Parameter Enum Parameter Constructor Enum Constructor LocalVariable Enum Local variable AnnotationType Enum Annotation type Package Enum Package TypeParameter Enum Type parameter TypeUse Enum Type use
UsingType Field Name Type Description Any Enum Any usage Get Enum Get usage Set Enum Set usage