Package org.exolab.castor.util
Class ReflectionUtil
java.lang.Object
org.exolab.castor.util.ReflectionUtil
Utility class to support reflection-based operations.
- Since:
- 1.1.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Boolean
isEnumViaReflection
(Class type) Calls isEnum() method on target class vi areflection to find out whether the given type is a Java 5 enumeration.
-
Constructor Details
-
ReflectionUtil
public ReflectionUtil()
-
-
Method Details
-
isEnumViaReflection
public static Boolean isEnumViaReflection(Class type) throws NoSuchMethodException, IllegalAccessException, 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:
NoSuchMethodException
- If the method can not be found.IllegalAccessException
- If access to this method is illegalInvocationTargetException
- If the target method can not be invoked.
-