Package ftbsc.lll.proxies.impl
Class MethodProxy.Builder
- Enclosing class:
- MethodProxy
A builder object for
MethodProxy.-
Field Summary
Fields inherited from class ftbsc.lll.proxies.AbstractProxy.Builder
descriptor, modifiers, name, parent -
Method Summary
Modifier and TypeMethodDescriptionaddParameter(Class<?> paramType) Adds a parameter of a given type.addParameter(String fqn, int arrayLevel) Adds a parameter of a given type.build()Builds aMethodProxyof the given kind.setDescriptor(String descr) Sets the type of the method to the given descriptor, and extracts return and parameter types from it.Sets the parent class of this method to the one described by the fully qualified name.Sets the parent class of this method to the one described by the fully qualified name and with the given modifiers.setReturnType(Class<?> returnType) Sets the return type to the given type.setReturnType(String fqn, int arrayLevel) Sets the return type to the given type.Methods inherited from class ftbsc.lll.proxies.AbstractProxy.Builder
addModifier, setModifiers, setParent, setType
-
Method Details
-
addParameter
Adds a parameter of a given type.- Parameters:
fqn- the fully qualified name of the parameter typearrayLevel- the array level of the parameter type- Returns:
- the builder's state after the change
-
addParameter
Adds a parameter of a given type.- Parameters:
paramType- theClassobject corresponding to the parameter type.- Returns:
- the builder's state after the change
-
setReturnType
Sets the return type to the given type.- Parameters:
fqn- the fully qualified name of the return typearrayLevel- the array level of the return type- Returns:
- the builder's state after the change
-
setParent
Sets the parent class of this method to the one described by the fully qualified name and with the given modifiers.- Parameters:
parentFQN- the fully qualified name of the parentmodifiers- the modifiers of the parent- Returns:
- the builder's state after the change
-
setParent
Sets the parent class of this method to the one described by the fully qualified name.- Parameters:
parentFQN- the fully qualified name of the parent- Returns:
- the builder's state after the change
-
setReturnType
Sets the return type to the given type.- Parameters:
returnType- theClassobject corresponding to the return type- Returns:
- the builder's state after the change
-
setDescriptor
Sets the type of the method to the given descriptor, and extracts return and parameter types from it.- Overrides:
setDescriptorin classAbstractProxy.Builder<MethodProxy>- Parameters:
descr- the descriptor- Returns:
- the builder's state after the change
-
build
Builds aMethodProxyof the given kind.- Specified by:
buildin classAbstractProxy.Builder<MethodProxy>- Returns:
- the built
MethodProxy
-