public static class MethodProxy.Builder extends AbstractProxy.Builder<MethodProxy>
MethodProxy
.descriptor, modifiers, name, parent
Modifier and Type | Method and Description |
---|---|
MethodProxy.Builder |
addParameter(java.lang.Class<?> paramType)
Adds a parameter of a given type.
|
MethodProxy.Builder |
addParameter(java.lang.String fqn,
int arrayLevel)
Adds a parameter of a given type.
|
MethodProxy |
build()
Builds a
MethodProxy of the given kind. |
MethodProxy.Builder |
setDescriptor(java.lang.String descr)
Sets the type of the method to the given descriptor,
and extracts return and parameter types from it.
|
MethodProxy.Builder |
setParent(java.lang.String parentFQN)
Sets the parent class of this method to the one described by the
fully qualified name.
|
MethodProxy.Builder |
setParent(java.lang.String parentFQN,
int modifiers)
Sets the parent class of this method to the one described by the
fully qualified name and with the given modifiers.
|
MethodProxy.Builder |
setReturnType(java.lang.Class<?> returnType)
Sets the return type to the given type.
|
MethodProxy.Builder |
setReturnType(java.lang.String fqn,
int arrayLevel)
Sets the return type to the given type.
|
addModifier, setModifiers, setParent, setType
public MethodProxy.Builder addParameter(java.lang.String fqn, int arrayLevel)
fqn
- the fully qualified name of the parameter typearrayLevel
- the array level of the parameter typepublic MethodProxy.Builder addParameter(java.lang.Class<?> paramType)
paramType
- the Class
object corresponding to
the parameter type.public MethodProxy.Builder setReturnType(java.lang.String fqn, int arrayLevel)
fqn
- the fully qualified name of the return typearrayLevel
- the array level of the return typepublic MethodProxy.Builder setParent(java.lang.String parentFQN, int modifiers)
parentFQN
- the fully qualified name of the parentmodifiers
- the modifiers of the parentpublic MethodProxy.Builder setParent(java.lang.String parentFQN)
parentFQN
- the fully qualified name of the parentpublic MethodProxy.Builder setReturnType(java.lang.Class<?> returnType)
returnType
- the Class
object corresponding to
the return typepublic MethodProxy.Builder setDescriptor(java.lang.String descr)
setDescriptor
in class AbstractProxy.Builder<MethodProxy>
descr
- the descriptorpublic MethodProxy build()
MethodProxy
of the given kind.build
in class AbstractProxy.Builder<MethodProxy>
MethodProxy