|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.rop.type.Prototype
public final class Prototype
Representation of a method descriptor. Instances of this class are
generally interned and may be usefully compared with each other
using ==.
| Method Summary | |
|---|---|
int |
compareTo(Prototype other)
|
boolean |
equals(Object other)
|
String |
getDescriptor()
Gets the descriptor string. |
StdTypeList |
getParameterFrameTypes()
Gets the list of frame types corresponding to the list of parameter types. |
StdTypeList |
getParameterTypes()
Gets the list of parameter types. |
Type |
getReturnType()
Gets the return type. |
int |
hashCode()
|
static Prototype |
intern(String descriptor)
Returns the unique instance corresponding to the given method descriptor. |
static Prototype |
intern(String descriptor,
Type definer,
boolean isStatic,
boolean isInit)
Interns an instance, adding to the descriptor as necessary based on the given definer, name, and flags. |
static Prototype |
internInts(Type returnType,
int count)
Interns an instance which consists of the given number of ints along with the given return type |
String |
toString()
|
Prototype |
withFirstParameter(Type param)
Returns a new interned instance, which is the same as this instance, except that it has an additional parameter prepended to the original's argument list. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Prototype intern(String descriptor)
descriptor - non-null; the descriptor
non-null; the corresponding instance
IllegalArgumentException - thrown if the descriptor has
invalid syntax
public static Prototype intern(String descriptor,
Type definer,
boolean isStatic,
boolean isInit)
definer
as its first argument.
descriptor - non-null; the descriptor stringdefiner - non-null; class the method is defined onisStatic - whether this is a static methodisInit - whether this is an init method
non-null; the interned instance
public static Prototype internInts(Type returnType,
int count)
ints along with the given return type
returnType - non-null; the return typecount - > 0; the number of elements in the prototype
non-null; the interned instancepublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Prototype other)
compareTo in interface Comparable<Prototype>public String toString()
toString in class Objectpublic String getDescriptor()
non-null; the descriptorpublic Type getReturnType()
non-null; the return typepublic StdTypeList getParameterTypes()
non-null; the list of parameter typespublic StdTypeList getParameterFrameTypes()
Type.isIntlike()) are replaced by
Type.INT.
non-null; the list of parameter frame typespublic Prototype withFirstParameter(Type param)
param - non-null; the new first parameter
non-null; an appropriately-constructed instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||