org.wamblee.reflection
Class ReflectionUtils
java.lang.Object
org.wamblee.reflection.ReflectionUtils
public class ReflectionUtils
- extends Object
Some utilities for reflection.
- Author:
- Erik Brakkee
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PRIMITIVE_WRAPPERS
public static final List<Class> PRIMITIVE_WRAPPERS
ReflectionUtils
public ReflectionUtils()
wrapIfNeeded
public static Class wrapIfNeeded(Class aClass)
- Wraps a type by the corresponding wrapper type if it is a primitive type.
- Parameters:
aClass - Type to wrap.
- Returns:
- Wrapped type for primitives or the provided argument value.
getAllMethods
public static List<Method> getAllMethods(Class aClass,
Class... aExcludedClasses)
getAllFields
public static List<Field> getAllFields(Class aClass,
Class... aExcludedClasses)
isPrimitive
public static boolean isPrimitive(Class aClass)
- Checks if a class is a primitive type or wrapper type.
- Parameters:
aClass -
- Returns:
Copyright © 2011. All Rights Reserved.