public interface ProxyAssemblerPlugin
Modifier and Type | Method and Description |
---|---|
void |
assemble(org.objectweb.asm.ClassWriter classWriter)
Entry point into this plugin's arbitrary method assembly process.
|
java.util.Set<java.lang.reflect.Method> |
getImplementedMethods()
Report the set of methods which this plugin will implement.
|
ProxyAssembler.ProxyMethod |
getProxyMethodAssembler(java.lang.reflect.Method method)
Return an object which will assemble the given proxy method, or
null if this
plugin will allow the default proxy method implementation. |
java.util.Set<java.lang.reflect.Method> getImplementedMethods()
Note that any method in the returned set will NOT be included in the array of methods the
invocation handler will have access to at runtime. Therefore, the returned set should NOT
include any method handled specifically by getProxyMethodAssembler(Method)
.
getProxyMethodAssembler(Method)
will not be invoked for any of the methods in the
returned set.
null
.ProxyAssembler.ProxyMethod getProxyMethodAssembler(java.lang.reflect.Method method)
null
if this
plugin will allow the default proxy method implementation. If a non-null
value is returned, the corresponding method should NOT be included in the set of methods
reported by getImplementedMethods()
.
This method is invoked for each proxy method implemented by the main proxy assembler.
method
- Method for which a proxy implementation is needed.ProxyAssembler.ProxyMethod
or null
if the
default proxy method implementation is suitable for the given method.getImplementedMethods()
void assemble(org.objectweb.asm.ClassWriter classWriter)
getImplementedMethods()
and after getProxyMethodAssembler(Method)
(i.e.,
after the main proxy assembler has implemented its methods), but before
ClassWriter.visitEnd
is invoked to terminate the assembly process.classWriter
- ASM class writer which the plugin will use to do its work.