public class DescriptorBuilder
extends java.lang.Object
| Constructor and Description |
|---|
DescriptorBuilder()
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DescriptorBuilder |
addParameter(java.lang.Class<?> param)
Adds a parameter of the given class type to the method.
|
DescriptorBuilder |
addParameter(java.lang.String param)
Adds a parameter with the type specified by the given fully
qualified name to the method.
|
DescriptorBuilder |
addParameter(java.lang.String param,
int arrayLevel)
Adds a parameter with the type specified by the given fully
qualified name (example: java.lang.String) to the method, with
the specified array level.
|
java.lang.String |
build()
Builds the descriptor into a string.
|
static java.lang.String |
nameToDescriptor(java.lang.String name,
int arrayLevel)
Converts a fully qualified name and array level to a descriptor.
|
DescriptorBuilder |
setReturnType(java.lang.Class<?> returnType)
Sets the return type to the given type.
|
DescriptorBuilder |
setReturnType(java.lang.String returnType)
Sets the return type to the Object specified here as a fully
qualified name.
|
DescriptorBuilder |
setReturnType(java.lang.String returnType,
int arrayLevel)
Sets the return type to the Object specified here as a fully
qualified name (example: java.lang.String), with the specified array level.
|
public DescriptorBuilder()
public DescriptorBuilder setReturnType(java.lang.Class<?> returnType)
Class may cause problems if used with objects outside the Java
SDK. Pass the fully qualified name as a String rather than the Class
object for non-standard types.returnType - the Class object corresponding to the return typepublic DescriptorBuilder setReturnType(java.lang.String returnType)
returnType - the fully qualified name of the desired Object.public DescriptorBuilder setReturnType(java.lang.String returnType, int arrayLevel)
returnType - the fully qualified name of the desired Object.arrayLevel - how many levels of array are there
(example: String is 0, String[] is 1, String[][] is 2, etc.)public DescriptorBuilder addParameter(java.lang.Class<?> param)
Class may cause problems if used with objects outside the Java
SDK. Pass the fully qualified name as a String rather than the Class
object for non-standard types.param - the Class object corresponding to the parameterpublic DescriptorBuilder addParameter(java.lang.String param)
param - the fully qualified name of the parameter typepublic DescriptorBuilder addParameter(java.lang.String param, int arrayLevel)
param - the fully qualified name of the parameter typearrayLevel - how many levels of array are there
(example: String is 0, String[] is 1, String[][] is 2, etc.)public java.lang.String build()
int m(Object[] o) becomes ([Ljava/lang/Object;)Ipublic static java.lang.String nameToDescriptor(java.lang.String name,
int arrayLevel)
name - the fully qualified name of the object typearrayLevel - how many levels of array are there
(example: String is 0, String[] is 1, String[][] is 2, etc.)