Package com.ibm.wala.types
Class Descriptor
- java.lang.Object
-
- com.ibm.wala.types.Descriptor
-
public final class Descriptor extends Object
A method descriptor; something like: (Ljava/langString;)Ljava/lang/Class; Descriptors are canonical
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static DescriptorfindOrCreate(Language l, ImmutableByteArray b)static DescriptorfindOrCreate(TypeName[] parameters, TypeName returnType)static DescriptorfindOrCreate(ImmutableByteArray b)static DescriptorfindOrCreateUTF8(Language l, String s)static DescriptorfindOrCreateUTF8(String s)intgetNumberOfParameters()TypeName[]getParameters()TypeNamegetReturnType()inthashCode()StringtoString()StringtoUnicodeString()
-
-
-
Method Detail
-
findOrCreate
public static Descriptor findOrCreate(TypeName[] parameters, TypeName returnType)
- Parameters:
parameters- the parameters for a descriptorreturnType- the return type- Returns:
- the canonical representative for this descriptor value
-
findOrCreate
public static Descriptor findOrCreate(Language l, ImmutableByteArray b) throws IllegalArgumentException
- Parameters:
b- a byte array holding the string representation of this descriptor- Returns:
- the canonical representative for this descriptor value
- Throws:
IllegalArgumentException
-
findOrCreate
public static Descriptor findOrCreate(ImmutableByteArray b) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
findOrCreateUTF8
public static Descriptor findOrCreateUTF8(String s) throws IllegalArgumentException
- Parameters:
s- string representation of this descriptor- Returns:
- the canonical representative for this descriptor value
- Throws:
IllegalArgumentException
-
findOrCreateUTF8
public static Descriptor findOrCreateUTF8(Language l, String s) throws IllegalArgumentException
- Parameters:
s- string representation of this descriptor- Returns:
- the canonical representative for this descriptor value
- Throws:
IllegalArgumentException
-
toUnicodeString
public String toUnicodeString()
- Returns:
- a unicode string representation of this descriptor
-
getReturnType
public TypeName getReturnType()
- Returns:
- the name of the return type of this descriptor
-
getParameters
public TypeName[] getParameters()
- Returns:
- the type names for the parameters in this descriptor
-
getNumberOfParameters
public int getNumberOfParameters()
- Returns:
- number of parameters in this descriptor
-
-