net.sf.morph.util
Class ReflectorUtils
java.lang.Object
net.sf.morph.util.ReflectorUtils
public abstract class ReflectorUtils
- extends java.lang.Object
Utility functions useful for implementing and interacting with Reflectors.
- Since:
- Nov 26, 2004
- Author:
- Matt Sgarlata
Method Summary |
static boolean |
isReflectable(Reflector reflector,
java.lang.Class reflectedType,
java.lang.Class reflectorType)
Indicates whether the given reflector can support the operations
specified in reflectorType when reflecting instances of
reflectedType . |
static boolean |
isReflectable(Reflector reflector,
java.lang.Object reflectedObject,
java.lang.Class reflectorType)
Indicates whether the given reflector can support the operations
specified in reflectorType when reflecting
reflectedObject . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReflectorUtils
public ReflectorUtils()
isReflectable
public static boolean isReflectable(Reflector reflector,
java.lang.Class reflectedType,
java.lang.Class reflectorType)
throws java.lang.IllegalArgumentException
- Indicates whether the given reflector can support the operations
specified in
reflectorType
when reflecting instances of
reflectedType
.
- Parameters:
reflector
- the reflectorreflectedType
- the type of the object for which we wish to determine
reflectabilityreflectorType
- the interface which defines the operations we would like to
perform on instances of reflectedType
- Returns:
true
, if the given reflector can support the
operations specified in reflectorType
when
reflecting instances of reflectedType
- Throws:
java.lang.IllegalArgumentException
- if any of the arguments to this function are
null
ReflectionException
- if reflectability could not be determined
isReflectable
public static boolean isReflectable(Reflector reflector,
java.lang.Object reflectedObject,
java.lang.Class reflectorType)
- Indicates whether the given reflector can support the operations
specified in
reflectorType
when reflecting
reflectedObject
.
- Parameters:
reflector
- the reflectorreflectedObject
- the object for which we wish to determine reflectabilityreflectorType
- the interface which defines the operations we would like to
perform on instances of reflectedType
- Returns:
true
, if the given reflector can support the
operations specified in reflectorType
when
reflecting instances of reflectedType
- Throws:
java.lang.IllegalArgumentException
- if any of the arguments to this function are
null
ReflectionException
- if reflectability could not be determined- Since:
- Morph 1.1
Copyright © 2004-2008.