Class JdkReflector

    • Constructor Detail

      • JdkReflector

        public JdkReflector​(java.lang.ClassLoader classLoader)
        Constructor
        Parameters:
        classLoader - class loader
      • JdkReflector

        public JdkReflector​(JdkLoader classLoader)
        Constructor
        Parameters:
        classLoader - class loader
    • Method Detail

      • array

        public ReflectArray array()
        ReflectArray factory
        Specified by:
        array in interface Reflector
        Returns:
        ReflectArray instance
      • deepClone

        public java.lang.Object deepClone​(java.lang.Object obj)
        Creates a copy of the object
        Specified by:
        deepClone in interface DeepClone
        Parameters:
        obj - object to copy
        Returns:
        object copy
      • forClass

        public ReflectClass forClass​(java.lang.Class clazz)
        Returns ReflectClass for the specified class
        Specified by:
        forClass in interface Reflector
        Parameters:
        clazz - class
        Returns:
        ReflectClass for the specified class
      • forName

        public ReflectClass forName​(java.lang.String className)
        Returns ReflectClass for the specified class name
        Specified by:
        forName in interface Reflector
        Parameters:
        className - class name
        Returns:
        ReflectClass for the specified class name
      • createClass

        protected JdkClass createClass​(java.lang.Class clazz)
        creates a Class reflector when passed a class. This method is protected to allow overriding in cusom reflectors that override JdkReflector.
        Parameters:
        clazz - the class
        Returns:
        the class reflector
      • forObject

        public ReflectClass forObject​(java.lang.Object a_object)
        Returns ReflectClass for the specified class object
        Specified by:
        forObject in interface Reflector
        Parameters:
        a_object - class object
        Returns:
        ReflectClass for the specified class object
      • methodCallsSupported

        public boolean methodCallsSupported()
        Method stub. Returns false.
      • setParent

        public void setParent​(Reflector reflector)
        Sets parent reflector
        Specified by:
        setParent in interface Reflector
        Parameters:
        reflector - parent reflector
      • toMeta

        public static ReflectClass[] toMeta​(Reflector reflector,
                                            java.lang.Class[] clazz)
        Creates ReflectClass[] array from the Class[] array using the reflector specified
        Parameters:
        reflector - reflector to use
        clazz - class
        Returns:
        ReflectClass[] array
      • toNative

        public static java.lang.Class toNative​(ReflectClass claxx)
        Translates a ReflectClass into a native Class
        Parameters:
        claxx - ReflectClass to translate
        Returns:
        Class