public class InternalTypeEnumeration extends 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(String descriptor)
Creates a new InternalTypeEnumeration for the given method descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
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(String[] args)
A main method for testing the type enumeration.
|
String |
nextType()
Returns the next type from the method descriptor.
|
String |
returnType()
Returns the return type from the descriptor, assuming it's a method
descriptor.
|
public InternalTypeEnumeration(String descriptor)
public boolean hasFormalTypeParameters()
public String formalTypeParameters()
public boolean isMethodSignature()
public boolean hasMoreTypes()
public String nextType()
public String returnType()
public static void main(String[] args)
Copyright © 2015. All Rights Reserved.