public class ProxyBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ProxyBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ProxyBuilder |
addInterface(java.lang.Class<?> clazz)
Add an interface to the proxy class.
|
ProxyClass |
build()
Build the proxy class.
|
ProxyClassDefiner |
getClassDefiner() |
java.lang.Class<?>[] |
getInterfaces() |
InvocationHandler |
getInvocationHandler() |
java.util.function.Predicate<java.lang.reflect.Method> |
getMethodFilter() |
java.util.function.Function<java.lang.reflect.Method,java.lang.reflect.Method> |
getMethodMapper() |
java.lang.Class<?> |
getSuperClass() |
ProxyBuilder |
setClassDefiner(ProxyClassDefiner classDefiner)
Set the class definer for the proxy class.
|
ProxyBuilder |
setInterfaces(java.lang.Class<?>... interfaces)
Set the interfaces of the proxy class.
|
ProxyBuilder |
setInvocationHandler(InvocationHandler invocationHandler)
Set the invocation handler for the proxy class.
|
ProxyBuilder |
setMethodFilter(java.util.function.Predicate<java.lang.reflect.Method> methodFilter)
Set the filter for the methods that should be overridden by the proxy class.
|
ProxyBuilder |
setMethodMapper(java.util.function.Function<java.lang.reflect.Method,java.lang.reflect.Method> methodMapper)
Set the mapper for the methods that should be overridden by the proxy class.
|
ProxyBuilder |
setSuperClass(java.lang.Class<?> superClass)
Set the super class of the proxy class.
|
@Nullable public java.lang.Class<?> getSuperClass()
public ProxyBuilder setSuperClass(@Nullable java.lang.Class<?> superClass)
superClass - The super class@Nullable public java.lang.Class<?>[] getInterfaces()
public ProxyBuilder addInterface(@Nonnull java.lang.Class<?> clazz)
clazz - The interface to addpublic ProxyBuilder setInterfaces(@Nullable java.lang.Class<?>... interfaces)
interfaces - The interfacespublic java.util.function.Predicate<java.lang.reflect.Method> getMethodFilter()
public ProxyBuilder setMethodFilter(@Nonnull java.util.function.Predicate<java.lang.reflect.Method> methodFilter)
methodFilter - The method filterpublic java.util.function.Function<java.lang.reflect.Method,java.lang.reflect.Method> getMethodMapper()
public ProxyBuilder setMethodMapper(@Nonnull java.util.function.Function<java.lang.reflect.Method,java.lang.reflect.Method> methodMapper)
methodMapper - The method mapperpublic InvocationHandler getInvocationHandler()
public ProxyBuilder setInvocationHandler(@Nonnull InvocationHandler invocationHandler)
invocationHandler - The invocation handlerpublic ProxyClassDefiner getClassDefiner()
public ProxyBuilder setClassDefiner(@Nonnull ProxyClassDefiner classDefiner)
classDefiner - The class definerpublic ProxyClass build()