Class ClassReflectionHelperImpl

    • Constructor Detail

      • ClassReflectionHelperImpl

        public ClassReflectionHelperImpl()
    • Method Detail

      • getAllMethods

        public java.util.Set<MethodWrapper> getAllMethods​(java.lang.Class<?> clazz)
        Description copied from interface: ClassReflectionHelper
        Gets all methods for a class (taking class heirarchy into account)
        Specified by:
        getAllMethods in interface ClassReflectionHelper
        Parameters:
        clazz - The class to analyze for all methods
        Returns:
        The set of all methods on this class (and all subclasses)
      • getAllFields

        public java.util.Set<java.lang.reflect.Field> getAllFields​(java.lang.Class<?> clazz)
        Description copied from interface: ClassReflectionHelper
        Gets all fields for a class (taking class heirarchy into account)
        Specified by:
        getAllFields in interface ClassReflectionHelper
        Parameters:
        clazz - The class to analyze for all fields
        Returns:
        The set of all fields on this class (and all subclasses)
      • findPostConstruct

        public java.lang.reflect.Method findPostConstruct​(java.lang.Class<?> clazz,
                                                          java.lang.Class<?> matchingClass)
                                                   throws java.lang.IllegalArgumentException
        Description copied from interface: ClassReflectionHelper
        Finds the postConstruct method on this class
        Specified by:
        findPostConstruct in interface ClassReflectionHelper
        Parameters:
        clazz - The class to check for the postConstruct method
        matchingClass - The PostConstruct interface, a small performance improvement
        Returns:
        A matching method, or null if none can be found
        Throws:
        java.lang.IllegalArgumentException - If a method marked as postConstruct is invalid
      • findPreDestroy

        public java.lang.reflect.Method findPreDestroy​(java.lang.Class<?> clazz,
                                                       java.lang.Class<?> matchingClass)
                                                throws java.lang.IllegalArgumentException
        Description copied from interface: ClassReflectionHelper
        Finds the preDestroy method on this class
        Specified by:
        findPreDestroy in interface ClassReflectionHelper
        Parameters:
        clazz - The class to check for the postConstruct method
        matchingClass - The PostConstruct interface, a small performance improvement
        Returns:
        A matching method, or null if none can be found
        Throws:
        java.lang.IllegalArgumentException - If a method marked as postConstruct is invalid
      • clean

        public void clean​(java.lang.Class<?> clazz)
        Description copied from interface: ClassReflectionHelper
        Removes this class (and all appropriate sub-classes) from the cache
        Specified by:
        clean in interface ClassReflectionHelper
        Parameters:
        clazz - The class to remove. If null this method does nothing
      • dispose

        public void dispose()
        Description copied from interface: ClassReflectionHelper
        Releases the entire cache, though the ClassReflectionHelper is still usable after calling dispose
        Specified by:
        dispose in interface ClassReflectionHelper
      • size

        public int size()
        Description copied from interface: ClassReflectionHelper
        Returns an approximation of the current size of the cache
        Specified by:
        size in interface ClassReflectionHelper
        Returns:
        An approximation of the current size of the cache
      • getPostConstructMethod

        private java.lang.reflect.Method getPostConstructMethod​(java.lang.Class<?> clazz,
                                                                java.lang.Class<?> matchingClass)
      • getPreDestroyMethod

        private java.lang.reflect.Method getPreDestroyMethod​(java.lang.Class<?> clazz,
                                                             java.lang.Class<?> matchingClass)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object