类 FastClass


  • public abstract class FastClass
    extends java.lang.Object
    • 构造器概要

      构造器 
      限定符 构造器 说明
      protected FastClass()  
      protected FastClass​(java.lang.Class type)  
    • 方法概要

      所有方法 静态方法 实例方法 抽象方法 具体方法 
      修饰符和类型 方法 说明
      static FastClass create​(java.lang.Class type)  
      static FastClass create​(java.lang.ClassLoader loader, java.lang.Class type)  
      boolean equals​(java.lang.Object o)  
      FastConstructor getConstructor​(java.lang.Class[] parameterTypes)  
      FastConstructor getConstructor​(java.lang.reflect.Constructor constructor)  
      abstract int getIndex​(java.lang.Class[] parameterTypes)
      Return the index of the matching constructor.
      abstract int getIndex​(java.lang.String name, java.lang.Class[] parameterTypes)
      Return the index of the matching method.
      abstract int getIndex​(Signature sig)  
      java.lang.Class getJavaClass()  
      abstract int getMaxIndex()
      Returns the maximum method index for this class.
      FastMethod getMethod​(java.lang.reflect.Method method)  
      FastMethod getMethod​(java.lang.String name, java.lang.Class[] parameterTypes)  
      java.lang.String getName()  
      protected static java.lang.String getSignatureWithoutReturnType​(java.lang.String name, java.lang.Class[] parameterTypes)  
      int hashCode()  
      abstract java.lang.Object invoke​(int index, java.lang.Object obj, java.lang.Object[] args)
      Invoke the method with the specified index.
      java.lang.Object invoke​(java.lang.String name, java.lang.Class[] parameterTypes, java.lang.Object obj, java.lang.Object[] args)  
      java.lang.Object newInstance()  
      abstract java.lang.Object newInstance​(int index, java.lang.Object[] args)
      Create a new instance using the specified constructor index and arguments.
      java.lang.Object newInstance​(java.lang.Class[] parameterTypes, java.lang.Object[] args)  
      java.lang.String toString()  
      • 从类继承的方法 java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 构造器详细资料

      • FastClass

        protected FastClass()
      • FastClass

        protected FastClass​(java.lang.Class type)
    • 方法详细资料

      • create

        public static FastClass create​(java.lang.Class type)
      • create

        public static FastClass create​(java.lang.ClassLoader loader,
                                       java.lang.Class type)
      • invoke

        public java.lang.Object invoke​(java.lang.String name,
                                       java.lang.Class[] parameterTypes,
                                       java.lang.Object obj,
                                       java.lang.Object[] args)
                                throws java.lang.reflect.InvocationTargetException
        抛出:
        java.lang.reflect.InvocationTargetException
      • newInstance

        public java.lang.Object newInstance()
                                     throws java.lang.reflect.InvocationTargetException
        抛出:
        java.lang.reflect.InvocationTargetException
      • newInstance

        public java.lang.Object newInstance​(java.lang.Class[] parameterTypes,
                                            java.lang.Object[] args)
                                     throws java.lang.reflect.InvocationTargetException
        抛出:
        java.lang.reflect.InvocationTargetException
      • getMethod

        public FastMethod getMethod​(java.lang.reflect.Method method)
      • getConstructor

        public FastConstructor getConstructor​(java.lang.reflect.Constructor constructor)
      • getMethod

        public FastMethod getMethod​(java.lang.String name,
                                    java.lang.Class[] parameterTypes)
      • getConstructor

        public FastConstructor getConstructor​(java.lang.Class[] parameterTypes)
      • getName

        public java.lang.String getName()
      • getJavaClass

        public java.lang.Class getJavaClass()
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Object
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        覆盖:
        equals 在类中 java.lang.Object
      • getIndex

        public abstract int getIndex​(java.lang.String name,
                                     java.lang.Class[] parameterTypes)
        Return the index of the matching method. The index may be used later to invoke the method with less overhead. If more than one method matches (i.e. they differ by return type only), one is chosen arbitrarily.
        参数:
        name - the method name
        parameterTypes - the parameter array
        返回:
        the index, or -1 if none is found.
        另请参阅:
        invoke(int, Object, Object[])
      • getIndex

        public abstract int getIndex​(java.lang.Class[] parameterTypes)
        Return the index of the matching constructor. The index may be used later to create a new instance with less overhead.
        参数:
        parameterTypes - the parameter array
        返回:
        the constructor index, or -1 if none is found.
        另请参阅:
        newInstance(int, Object[])
      • invoke

        public abstract java.lang.Object invoke​(int index,
                                                java.lang.Object obj,
                                                java.lang.Object[] args)
                                         throws java.lang.reflect.InvocationTargetException
        Invoke the method with the specified index.
        参数:
        index - the method index
        obj - the object the underlying method is invoked from
        args - the arguments used for the method call
        抛出:
        java.lang.reflect.InvocationTargetException - if the underlying method throws an exception
        另请参阅:
        getIndex(name, Class[])
      • newInstance

        public abstract java.lang.Object newInstance​(int index,
                                                     java.lang.Object[] args)
                                              throws java.lang.reflect.InvocationTargetException
        Create a new instance using the specified constructor index and arguments.
        参数:
        index - the constructor index
        args - the arguments passed to the constructor
        抛出:
        java.lang.reflect.InvocationTargetException - if the constructor throws an exception
        另请参阅:
        getIndex(java.lang.Class[])
      • getIndex

        public abstract int getIndex​(Signature sig)
      • getMaxIndex

        public abstract int getMaxIndex()
        Returns the maximum method index for this class.
      • getSignatureWithoutReturnType

        protected static java.lang.String getSignatureWithoutReturnType​(java.lang.String name,
                                                                        java.lang.Class[] parameterTypes)