| Modifier and Type | Method and Description |
|---|---|
static void |
clearInternTable() |
int |
compareTo(Prototype other) |
boolean |
equals(java.lang.Object other) |
static Prototype |
fromDescriptor(java.lang.String descriptor)
Returns a prototype for a method descriptor.
|
java.lang.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(java.lang.String descriptor)
Returns the unique instance corresponding to the
given method descriptor.
|
static Prototype |
intern(java.lang.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 |
java.lang.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.
|
public static Prototype intern(java.lang.String descriptor)
descriptor - non-null; the descriptornon-null; the corresponding instancejava.lang.IllegalArgumentException - thrown if the descriptor has
invalid syntaxpublic static Prototype fromDescriptor(java.lang.String descriptor)
Prototype returned will be the interned value if present,
or a new instance otherwise. If a new instance is created, it is not
placed in the intern table.descriptor - non-null; the descriptornon-null; the corresponding instancejava.lang.IllegalArgumentException - thrown if the descriptor has
invalid syntaxpublic static void clearInternTable()
public static Prototype intern(java.lang.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 methodnon-null; the interned instancepublic static Prototype internInts(Type returnType, int count)
ints along with the given return typereturnType - non-null; the return typecount - > 0; the number of elements in the prototypenon-null; the interned instancepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(Prototype other)
compareTo in interface java.lang.Comparable<Prototype>public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.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 parameternon-null; an appropriately-constructed instanceCopyright © 2020. All Rights Reserved.