Package proguard.classfile
Class MethodDescriptor
java.lang.Object
proguard.classfile.MethodDescriptor
Represents the descriptor that is part of a
MethodSignature. A descriptor consists of
parameter types and return type of a method, e.g. "()V" for a void method with no parameters, or
"(II)B" for a method that takes two integers and returns a boolean. Read more about this topic in
ยง4.3.3 of
the JVM specification.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMethodDescriptor(String descriptor) MethodDescriptor(String returnType, List<String> argumentTypes) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the human readable representation of the argument types.Get the human readable representation of the return type.inthashCode()booleanCheck if this descriptor is missing information.static booleanmatchesIgnoreNull(MethodDescriptor descriptor, MethodDescriptor wildcard) static booleanmatchesIgnoreNullAndDollar(MethodDescriptor descriptor, MethodDescriptor wildcard) toString()
-
Field Details
-
returnType
Deprecated. -
argumentTypes
Deprecated.
-
-
Constructor Details
-
MethodDescriptor
-
MethodDescriptor
-
-
Method Details
-
isIncomplete
public boolean isIncomplete()Check if this descriptor is missing information. -
getReturnType
-
getArgumentTypes
-
matchesIgnoreNull
- Parameters:
descriptor- TheMethodDescriptorto be comparedwildcard- TheMethodDescriptorpattern to be matched against- Returns:
- true if the two objects match
-
matchesIgnoreNullAndDollar
public static boolean matchesIgnoreNullAndDollar(MethodDescriptor descriptor, MethodDescriptor wildcard) - Parameters:
descriptor- TheMethodDescriptorto be comparedwildcard- TheMethodDescriptorpattern to be matched against- Returns:
- true if the two objects match
-
getPrettyReturnType
Get the human readable representation of the return type. E.g. "void" for "V" or "?" for an undefined return type.- Returns:
- The human readable representation of
returnType
-
getPrettyArgumentTypes
Get the human readable representation of the argument types. E.g. "String,int" for "(Ljava/lang/String;I)".- Returns:
- The human readable representation of
argumentTypes
-
toString
-
equals
-
hashCode
public int hashCode()
-