Class TypeRefFactory

  • All Implemented Interfaces:
    ITypeRefFactory

    public class TypeRefFactory
    extends java.lang.Object
    implements ITypeRefFactory
    There is one TypeRefFactory per ModuleTypeLoader.
    • Field Detail

      • TRACE

        private static boolean TRACE
      • VERIFY

        private static boolean VERIFY
      • ASM_CHECKER

        private static boolean ASM_CHECKER
      • ITYPE_PROXY_CLASS_BY_ITYPE_CLASS

        private static final java.util.Map<java.lang.Class<? extends IType>,​java.lang.Class<? extends AbstractTypeRef>> ITYPE_PROXY_CLASS_BY_ITYPE_CLASS
      • _bClearing

        private boolean _bClearing
    • Constructor Detail

      • TypeRefFactory

        public TypeRefFactory()
    • Method Detail

      • getRefTheFastWay

        private ITypeRef getRefTheFastWay​(IType type,
                                          java.lang.String strTypeName)
      • getRefTheSafeWay

        private ITypeRef getRefTheSafeWay​(IType type,
                                          java.lang.String strTypeName)
      • getOrCreateTypeProxy

        private java.lang.Class<? extends AbstractTypeRef> getOrCreateTypeProxy​(java.lang.Class<? extends IType> typeClass)
      • generateProxyClass

        private java.lang.Class<? extends AbstractTypeRef> generateProxyClass​(java.lang.Class<? extends IType> typeClass)
      • compileHeader

        private void compileHeader​(org.objectweb.asm.ClassVisitor cv,
                                   java.lang.String name,
                                   java.util.List<java.lang.Class> interfaces)
      • getInterfaceNames

        private java.lang.String[] getInterfaceNames​(java.util.List<java.lang.Class> interfaces)
      • addDefaultConstructor

        private void addDefaultConstructor​(org.objectweb.asm.ClassVisitor cv)
      • compileInterfaceMembers

        private void compileInterfaceMembers​(org.objectweb.asm.ClassVisitor cv,
                                             java.lang.Class typeClass)
      • genMethod_DevMode

        private void genMethod_DevMode​(org.objectweb.asm.ClassVisitor cv,
                                       java.lang.reflect.Method ifaceMethod,
                                       java.lang.reflect.Method proxyMethod)
      • genBody_NoRefreshSupport

        private void genBody_NoRefreshSupport​(java.lang.reflect.Method ifaceMethod,
                                              java.lang.reflect.Method proxyMethod,
                                              org.objectweb.asm.MethodVisitor mv)
      • genBody_SupportRefresh

        private void genBody_SupportRefresh​(java.lang.reflect.Method ifaceMethod,
                                            java.lang.reflect.Method proxyMethod,
                                            org.objectweb.asm.MethodVisitor mv)
      • visitDebugLineNumber

        private void visitDebugLineNumber​(int iLine,
                                          org.objectweb.asm.MethodVisitor mv)
      • insertGetNameStart

        private void insertGetNameStart​(org.objectweb.asm.MethodVisitor mv)
      • call_reload

        private void call_reload​(org.objectweb.asm.MethodVisitor mv)
      • assignType

        private void assignType​(java.lang.reflect.Method ifaceMethod,
                                org.objectweb.asm.MethodVisitor mv,
                                int typeIndex)
      • assignType_FromField

        private void assignType_FromField​(java.lang.reflect.Method ifaceMethod,
                                          org.objectweb.asm.MethodVisitor mv,
                                          int typeIndex)
      • constructRuntimeException

        private void constructRuntimeException​(org.objectweb.asm.MethodVisitor mv,
                                               int exceptionIndex)
      • delegateMethodCall

        private void delegateMethodCall​(java.lang.reflect.Method ifaceMethod,
                                        java.lang.reflect.Method proxyMethod,
                                        org.objectweb.asm.MethodVisitor mv,
                                        int typeIndex)
      • isTypeGosuClassInstance

        private boolean isTypeGosuClassInstance​(java.lang.Class<?> declaringClass)
      • getInterfaceMethod

        private java.lang.reflect.Method getInterfaceMethod​(java.lang.reflect.Method method)
      • computeSortIndex

        private int computeSortIndex​(java.util.Map.Entry<java.lang.String,​java.lang.ref.Reference<AbstractTypeRef>> entry)
      • setClearing

        private void setClearing​(boolean bClearing)
      • getInterfacesFrom

        private void getInterfacesFrom​(java.lang.Class<? extends IType> classOfType,
                                       java.util.List<java.lang.Class> interfaces)
      • getJavaClass

        private java.lang.Class getJavaClass​(IType iface)
      • getIns

        private int getIns​(int opcode,
                           java.lang.Class type)
      • getIns

        private int getIns​(int opcode,
                           java.lang.String typeName)
      • isWide

        private boolean isWide​(java.lang.Class type)
      • isWide

        private boolean isWide​(java.lang.String typeName)
      • getSlashName

        private java.lang.String getSlashName​(java.lang.Class type)
      • getSlashName

        private java.lang.String getSlashName​(java.lang.String typeName)
      • getParameterTypeDescriptors

        private java.lang.String[] getParameterTypeDescriptors​(java.lang.reflect.Method _method)
      • getReturnTypeDescriptor

        private java.lang.String getReturnTypeDescriptor​(java.lang.reflect.Method _method)
      • getDescriptor

        private java.lang.String getDescriptor​(java.lang.Class<?> returnType)
      • getMethodDescriptor

        private java.lang.String getMethodDescriptor​(java.lang.reflect.Method m)
      • getMethodDescriptor

        private java.lang.String getMethodDescriptor​(java.lang.String[] paramTypeDescriptors,
                                                     java.lang.String returnTypeDescriptor)
      • getMethodExceptions

        private java.lang.String[] getMethodExceptions​(java.lang.reflect.Method method)
      • callMethod

        private void callMethod​(org.objectweb.asm.MethodVisitor mv,
                                java.lang.reflect.Method method)
      • verify

        private static void verify​(byte[] bytes)
      • getTypesWithPrefix

        public java.util.List<java.lang.String> getTypesWithPrefix​(java.lang.String namespace,
                                                                   java.lang.String prefix)
        Specified by:
        getTypesWithPrefix in interface ITypeRefFactory