public class InternalTypeEnumeration
extends java.lang.Object
InternalTypeEnumeration
provides an enumeration of all
types listed in a given internal descriptor or signature of a class, a
method, or a field.
The leading formal type parameters, if any, can be retrieved separately.
The return type of a method descriptor can also be retrieved separately.Constructor and Description |
---|
InternalTypeEnumeration(java.lang.String descriptor)
Creates a new InternalTypeEnumeration for the given method descriptor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
formalTypeParameters()
Returns the leading formal type parameters from the descriptor.
|
boolean |
hasFormalTypeParameters()
Returns whether the descriptor has leading formal type parameters.
|
boolean |
hasMoreTypes()
Returns whether the enumeration can provide more types from the method
descriptor.
|
boolean |
isMethodSignature()
Returns whether the descriptor is a method signature.
|
static void |
main(java.lang.String[] args)
A main method for testing the type enumeration.
|
java.lang.String |
nextType()
Returns the next type from the method descriptor.
|
java.lang.String |
returnType()
Returns the return type from the descriptor, assuming it's a method
descriptor.
|
int |
typeCount()
Returns the number of types contained in the descriptor.
|
int |
typesSize()
Returns the total size of the types contained in the descriptor.
|
public InternalTypeEnumeration(java.lang.String descriptor)
public int typeCount()
public int typesSize()
public boolean hasFormalTypeParameters()
public java.lang.String formalTypeParameters()
public boolean isMethodSignature()
public boolean hasMoreTypes()
public java.lang.String nextType()
public java.lang.String returnType()
public static void main(java.lang.String[] args)