Package proguard.classfile
Class MethodDescriptor
- java.lang.Object
-
- proguard.classfile.MethodDescriptor
-
public class MethodDescriptor extends java.lang.ObjectRepresents the descriptor that is part of aMethodSignature. 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 Modifier and Type Field Description java.util.List<java.lang.String>argumentTypesDeprecated.java.lang.StringreturnTypeDeprecated.
-
Constructor Summary
Constructors Constructor Description MethodDescriptor(java.lang.String descriptor)MethodDescriptor(java.lang.String returnType, java.util.List<java.lang.String> argumentTypes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<java.lang.String>getArgumentTypes()java.lang.StringgetPrettyArgumentTypes()Get the human readable representation of the argument types.java.lang.StringgetPrettyReturnType()Get the human readable representation of the return type.java.lang.StringgetReturnType()inthashCode()booleanisIncomplete()Check if this descriptor is missing information.static booleanmatchesIgnoreNull(MethodDescriptor descriptor, MethodDescriptor wildcard)Analogous to {@link MethodSignature.matchesIgnoreNull(MethodSignature, MethodSignature)}.static booleanmatchesIgnoreNullAndDollar(MethodDescriptor descriptor, MethodDescriptor wildcard)Analogous to {@link MethodSignature.matchesIgnoreNullAndDollar(MethodSignature, MethodSignature)}.java.lang.StringtoString()
-
-
-
Method Detail
-
isIncomplete
public boolean isIncomplete()
Check if this descriptor is missing information.
-
getReturnType
public java.lang.String getReturnType()
-
getArgumentTypes
public java.util.List<java.lang.String> getArgumentTypes()
-
matchesIgnoreNull
public static boolean matchesIgnoreNull(MethodDescriptor descriptor, MethodDescriptor wildcard)
Analogous to {@link MethodSignature.matchesIgnoreNull(MethodSignature, MethodSignature)}.- 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)
Analogous to {@link MethodSignature.matchesIgnoreNullAndDollar(MethodSignature, MethodSignature)}.- Parameters:
descriptor- TheMethodDescriptorto be comparedwildcard- TheMethodDescriptorpattern to be matched against- Returns:
- true if the two objects match
-
getPrettyReturnType
public java.lang.String 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
public java.lang.String 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-