Class ReflectionUtil


  • public class ReflectionUtil
    extends java.lang.Object
    Utility class to support reflection-based operations.
    Since:
    1.1.2
    • Constructor Summary

      Constructors 
      Constructor Description
      ReflectionUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Boolean isEnumViaReflection​(java.lang.Class type)
      Calls isEnum() method on target class vi areflection to find out whether the given type is a Java 5 enumeration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReflectionUtil

        public ReflectionUtil()
    • Method Detail

      • isEnumViaReflection

        public static java.lang.Boolean isEnumViaReflection​(java.lang.Class type)
                                                     throws java.lang.NoSuchMethodException,
                                                            java.lang.IllegalAccessException,
                                                            java.lang.reflect.InvocationTargetException
        Calls isEnum() method on target class vi areflection to find out whether the given type is a Java 5 enumeration.
        Parameters:
        type - The type to analyze.
        Returns:
        True if the type given is a Java 5.0 enum.
        Throws:
        java.lang.NoSuchMethodException - If the method can not be found.
        java.lang.IllegalAccessException - If access to this method is illegal
        java.lang.reflect.InvocationTargetException - If the target method can not be invoked.