Example usage for Java org.springframework.cglib.proxy Enhancer fields, constructors, methods, implement or subclass
The text is from its open source code.
Enhancer() Create a new Enhancer . |
Object | create() Generate a new class if necessary and uses the specified callbacks (if any) to create a new object instance. |
Object | create(Class[] argumentTypes, Object[] arguments) Generate a new class if necessary and uses the specified callbacks (if any) to create a new object instance. |
Object | create(Class type, Callback callback) Helper method to create an intercepted object. |
Object | create(Class superclass, Class interfaces[], Callback callback) Helper method to create an intercepted object. |
Class | createClass() Generate a new class if necessary and return it without creating a new instance. |
boolean | getUseCache() |
boolean | isEnhanced(Class type) Determine if a class was generated using Enhancer . |
void | registerCallbacks(Class generatedClass, Callback[] callbacks) Call this method to register the Callback array to use before creating a new instance of the generated class via reflection. |
void | registerStaticCallbacks(Class generatedClass, Callback[] callbacks) Similar to #registerCallbacks , but suitable for use when multiple threads will be creating instances of the generated class. |
void | setCallback(final Callback callback) Set the single Callback to use. |
void | setCallbackFilter(CallbackFilter filter) Set the CallbackFilter used to map the generated class' methods to a particular callback index. |
void | setCallbacks(Callback[] callbacks) Set the array of callbacks to use. |
void | setCallbackType(Class callbackType) Set the single type of Callback to use. |
void | setCallbackTypes(Class[] callbackTypes) Set the array of callback types to use. |
void | setClassLoader(ClassLoader classLoader) Set the ClassLoader in which the class will be generated. |
void | setInterceptDuringConstruction(boolean interceptDuringConstruction) Set whether methods called from within the proxy's constructer will be intercepted. |
void | setInterfaces(Class[] interfaces) Set the interfaces to implement. |
void | setNamingPolicy(NamingPolicy namingPolicy) Override the default naming policy. |
void | setStrategy(GeneratorStrategy strategy) Set the strategy to use to create the bytecode from this generator. |
void | setSuperclass(Class superclass) Set the class which the generated class will extend. |
void | setUseCache(boolean useCache) Whether use and update the static cache of generated classes for a class with the same properties. |
void | setUseFactory(boolean useFactory) Set whether the enhanced object instances should implement the Factory interface. |