org.logicalcobwebs.cglib.proxy
Class EnhancerEmitter

java.lang.Object
  extended by org.logicalcobwebs.asm.ClassAdapter
      extended by org.logicalcobwebs.cglib.core.ClassEmitter
          extended by org.logicalcobwebs.cglib.proxy.EnhancerEmitter
All Implemented Interfaces:
ClassVisitor

 class EnhancerEmitter
extends ClassEmitter


Field Summary
private  java.lang.Class[] callbackTypes
           
private static java.lang.String CONSTRUCTED_FIELD
           
private static Signature COPY_MULTIARG_NEW_INSTANCE
           
private static Signature COPY_NEW_INSTANCE
           
private static Signature CSTRUCT_NULL
           
private static Type FACTORY
           
private static Signature GET_CALLBACK
           
private static Type ILLEGAL_ARGUMENT_EXCEPTION
           
private static Type ILLEGAL_STATE_EXCEPTION
           
private static Signature MULTIARG_NEW_INSTANCE
           
private static Signature NEW_INSTANCE
           
private static Signature SET_CALLBACK
           
private static Signature SET_CALLBACKS
           
private static Signature SET_THREAD_CALLBACKS
           
private static java.lang.String SET_THREAD_CALLBACKS_NAME
           
private static Signature SINGLE_NEW_INSTANCE
           
private static Type THREAD_LOCAL
           
private static Signature THREAD_LOCAL_GET
           
private static Signature THREAD_LOCAL_SET
           
 
Fields inherited from class org.logicalcobwebs.asm.ClassAdapter
cv
 
Constructor Summary
EnhancerEmitter(ClassVisitor v, java.lang.String className, java.lang.Class superclass, java.lang.Class[] interfaces, CallbackFilter filter, java.lang.Class[] callbackTypes, boolean useFactory)
           
 
Method Summary
private  void emitCommonMultiarg(java.lang.reflect.Constructor[] constructors, CodeEmitter e)
           
private  void emitCommonNewInstance(CodeEmitter e)
           
private  void emitConstructors(java.lang.reflect.Constructor[] constructors)
           
private  void emitCopyCallbacks(CodeEmitter e)
           
private  void emitCurrentCallback(CodeEmitter e, int index)
           
private  void emitGetCallback(int[] keys)
           
private  void emitMethods(java.util.Map groups, java.util.Map indexes, java.util.Set forcePublic)
           
private  void emitNewInstanceCallback()
           
private  void emitNewInstanceCallbacks()
           
private  void emitNewInstanceCopy()
           
private  void emitNewInstanceMultiarg(java.lang.reflect.Constructor[] constructors)
           
private  void emitNewInstanceMultiargCopy(java.lang.reflect.Constructor[] constructors)
           
private  void emitSetCallback(int[] keys)
           
private  void emitSetCallbacks()
           
private  void emitSetThreadCallbacks()
           
private  void emitSetThreadCallbacks(CodeEmitter e)
           
private static java.lang.String getCallbackField(int index)
           
private  int[] getCallbackKeys()
           
private static java.lang.String getThreadLocal(int index)
           
private static void removeFinal(java.util.List list)
           
(package private) static void setThreadCallbacks(java.lang.Class type, Callback[] callbacks)
           
 
Methods inherited from class org.logicalcobwebs.cglib.core.ClassEmitter
begin_class, begin_method, begin_static, declare_field, define_attribute, end_class, getAccess, getClassType, getStaticHook, getSuperType, init, setTarget, visit, visitAttribute, visitEnd, visitField, visitMethod
 
Methods inherited from class org.logicalcobwebs.asm.ClassAdapter
visitInnerClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTRUCTED_FIELD

private static final java.lang.String CONSTRUCTED_FIELD
See Also:
Constant Field Values

SET_THREAD_CALLBACKS_NAME

private static final java.lang.String SET_THREAD_CALLBACKS_NAME
See Also:
Constant Field Values

ILLEGAL_STATE_EXCEPTION

private static final Type ILLEGAL_STATE_EXCEPTION

ILLEGAL_ARGUMENT_EXCEPTION

private static final Type ILLEGAL_ARGUMENT_EXCEPTION

THREAD_LOCAL

private static final Type THREAD_LOCAL

FACTORY

private static final Type FACTORY

CSTRUCT_NULL

private static final Signature CSTRUCT_NULL

SET_THREAD_CALLBACKS

private static final Signature SET_THREAD_CALLBACKS

NEW_INSTANCE

private static final Signature NEW_INSTANCE

MULTIARG_NEW_INSTANCE

private static final Signature MULTIARG_NEW_INSTANCE

SINGLE_NEW_INSTANCE

private static final Signature SINGLE_NEW_INSTANCE

COPY_NEW_INSTANCE

private static final Signature COPY_NEW_INSTANCE

COPY_MULTIARG_NEW_INSTANCE

private static final Signature COPY_MULTIARG_NEW_INSTANCE

SET_CALLBACK

private static final Signature SET_CALLBACK

GET_CALLBACK

private static final Signature GET_CALLBACK

SET_CALLBACKS

private static final Signature SET_CALLBACKS

THREAD_LOCAL_GET

private static final Signature THREAD_LOCAL_GET

THREAD_LOCAL_SET

private static final Signature THREAD_LOCAL_SET

callbackTypes

private java.lang.Class[] callbackTypes
Constructor Detail

EnhancerEmitter

public EnhancerEmitter(ClassVisitor v,
                       java.lang.String className,
                       java.lang.Class superclass,
                       java.lang.Class[] interfaces,
                       CallbackFilter filter,
                       java.lang.Class[] callbackTypes,
                       boolean useFactory)
                throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

setThreadCallbacks

static void setThreadCallbacks(java.lang.Class type,
                               Callback[] callbacks)

emitConstructors

private void emitConstructors(java.lang.reflect.Constructor[] constructors)

getCallbackKeys

private int[] getCallbackKeys()

emitGetCallback

private void emitGetCallback(int[] keys)

emitSetCallback

private void emitSetCallback(int[] keys)

emitSetCallbacks

private void emitSetCallbacks()

emitNewInstanceCallbacks

private void emitNewInstanceCallbacks()

emitNewInstanceCopy

private void emitNewInstanceCopy()

emitCopyCallbacks

private void emitCopyCallbacks(CodeEmitter e)

emitCommonNewInstance

private void emitCommonNewInstance(CodeEmitter e)

emitNewInstanceCallback

private void emitNewInstanceCallback()

emitNewInstanceMultiarg

private void emitNewInstanceMultiarg(java.lang.reflect.Constructor[] constructors)

emitNewInstanceMultiargCopy

private void emitNewInstanceMultiargCopy(java.lang.reflect.Constructor[] constructors)

emitCommonMultiarg

private void emitCommonMultiarg(java.lang.reflect.Constructor[] constructors,
                                CodeEmitter e)

emitMethods

private void emitMethods(java.util.Map groups,
                         java.util.Map indexes,
                         java.util.Set forcePublic)
                  throws java.lang.Exception
Throws:
java.lang.Exception

emitSetThreadCallbacks

private void emitSetThreadCallbacks()

emitSetThreadCallbacks

private void emitSetThreadCallbacks(CodeEmitter e)

emitCurrentCallback

private void emitCurrentCallback(CodeEmitter e,
                                 int index)

getCallbackField

private static java.lang.String getCallbackField(int index)

getThreadLocal

private static java.lang.String getThreadLocal(int index)

removeFinal

private static void removeFinal(java.util.List list)