|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.morph.reflect.reflectors.BaseReflector net.sf.morph.reflect.reflectors.BaseCompositeReflector net.sf.morph.reflect.reflectors.StubbornDelegatingReflector
public class StubbornDelegatingReflector
Field Summary |
---|
Fields inherited from class net.sf.morph.reflect.reflectors.BaseReflector |
---|
log |
Fields inherited from interface net.sf.morph.reflect.BeanReflector |
---|
IMPLICIT_PROPERTY_CLASS, IMPLICIT_PROPERTY_PROPERTY_NAMES, IMPLICIT_PROPERTY_THIS |
Constructor Summary | |
---|---|
StubbornDelegatingReflector()
Construct a new SimpleDelegatingReflector. |
|
StubbornDelegatingReflector(java.lang.Object[] components)
Construct a new SimpleDelegatingReflector. |
Method Summary | |
---|---|
protected boolean |
addImpl(java.lang.Object container,
java.lang.Object value)
Implementation of GrowableContainer.add(Object) . |
protected java.lang.Class |
getContainedTypeImpl(java.lang.Class clazz)
Implementation of ContainerReflector.getContainedType(Class) . |
protected java.lang.Object |
getImpl(java.lang.Object container,
int index)
Implementation of IndexedContainerReflector.get(Object, int) . |
protected java.lang.Object |
getImpl(java.lang.Object bean,
java.lang.String propertyName)
Implementation of BeanReflector.get(Object, String) . |
protected java.util.Iterator |
getIteratorImpl(java.lang.Object container)
Implementation of ContainerReflector.getIterator(Object) . |
protected java.lang.String[] |
getPropertyNamesImpl(java.lang.Object bean)
Implementation of BeanReflector.getPropertyNames(Object) . |
protected java.lang.Class[] |
getReflectableClassesImpl()
Implementation of Reflector.getReflectableClasses() . |
protected int |
getSizeImpl(java.lang.Object container)
Implementation of SizableReflector.getSize(Object) . |
protected java.lang.Class |
getTypeImpl(java.lang.Object bean,
java.lang.String propertyName)
Default implementation finds the first reflector that returns a non-null value for the given property and returns the type of that value. |
protected void |
initializeImpl()
Implementation of BaseReflector.initialize() . |
protected boolean |
isReadableImpl(java.lang.Object bean,
java.lang.String propertyName)
Implementation of BeanReflector.isReadable(Object, String) . |
boolean |
isReflectableImpl(java.lang.Class reflectedType,
java.lang.Class reflectorType)
Implementation of BaseReflector.isReflectable(Class, Class) . |
protected boolean |
isWriteableImpl(java.lang.Object bean,
java.lang.String propertyName)
Implementation of BeanReflector.isWriteable(Object, String) . |
protected java.lang.Object |
newInstanceImpl(java.lang.Class clazz,
java.lang.Object parameters)
Implementation of InstantiatingReflector.newInstance(Class, Object) . |
protected java.lang.Object |
setImpl(java.lang.Object container,
int index,
java.lang.Object propertyValue)
Implementation of MutableIndexedContainerReflector.set(Object, int, Object) . |
protected void |
setImpl(java.lang.Object bean,
java.lang.String propertyName,
java.lang.Object value)
Implementation of BeanReflector.set(Object, String, Object) . |
Methods inherited from class net.sf.morph.reflect.reflectors.BaseCompositeReflector |
---|
clone, getComponents, getComponentType, getComponentValidator, getSpecializer, isPerformingLogging, isSpecializable, setComponents, setComponentValidator, setSpecializer, specialize, toString |
Methods inherited from class net.sf.morph.reflect.reflectors.BaseReflector |
---|
add, checkIndex, checkIsReflectable, createWrapperInvocationHandler, get, get, getContainedType, getIterator, getPropertyNames, getReflectableCallCache, getReflectableClasses, getReflectorName, getSize, getType, getWrapper, getWrapperImpl, initialize, isCachingIsReflectableCalls, isInitialized, isReadable, isReflectable, isReflectable, isReflectableImpl, isStrictlyTyped, isValidIndex, isWrappingRuntimeExceptions, isWriteable, newInstance, newInstanceImpl, set, set, setCachingIsReflectableCalls, setInitialized, setReflectableCallCache, setReflectorName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.morph.reflect.DecoratedReflector |
---|
isReflectable |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.composite.StrictlyTypedComposite |
---|
getComponentType |
Methods inherited from interface net.sf.composite.SpecializableComposite |
---|
isSpecializable, specialize |
Methods inherited from interface net.sf.morph.reflect.BeanReflector |
---|
get, getPropertyNames, getType, isReadable, isWriteable, set |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.morph.reflect.GrowableContainerReflector |
---|
add |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.morph.reflect.InstantiatingReflector |
---|
newInstance |
Methods inherited from interface net.sf.morph.reflect.MutableIndexedContainerReflector |
---|
set |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.morph.reflect.Reflector |
---|
getReflectableClasses, getWrapper |
Methods inherited from interface net.sf.morph.reflect.CompositeReflector |
---|
isReflectable |
Constructor Detail |
---|
public StubbornDelegatingReflector()
public StubbornDelegatingReflector(java.lang.Object[] components)
components
- Method Detail |
---|
protected void initializeImpl() throws java.lang.Exception
BaseReflector
BaseReflector.initialize()
.
initializeImpl
in class BaseReflector
java.lang.Exception
protected java.lang.Class[] getReflectableClassesImpl()
BaseReflector
Reflector.getReflectableClasses()
.
getReflectableClassesImpl
in class BaseReflector
protected java.lang.Object getImpl(java.lang.Object bean, java.lang.String propertyName) throws java.lang.Exception
BaseReflector
BeanReflector.get(Object, String)
.
Implementation automatically provided for
IndexedContainerReflectors. For other reflectors, throws an
UnsupportedOperationException.
getImpl
in class BaseReflector
java.lang.Exception
protected java.lang.String[] getPropertyNamesImpl(java.lang.Object bean) throws java.lang.Exception
BaseReflector
BeanReflector.getPropertyNames(Object)
.
Implementation automatically provided for
IndexedContainerReflectors. For other reflectors, throws an
UnsupportedOperationException.
getPropertyNamesImpl
in class BaseReflector
java.lang.Exception
protected java.lang.Class getTypeImpl(java.lang.Object bean, java.lang.String propertyName) throws java.lang.Exception
getTypeImpl
in class BaseReflector
java.lang.Exception
protected boolean isReadableImpl(java.lang.Object bean, java.lang.String propertyName) throws java.lang.Exception
BaseReflector
BeanReflector.isReadable(Object, String)
.
Default implementation assumes that all properties of the bean specified
by BeanReflector.getPropertyNames(Object)
are readable.
isReadableImpl
in class BaseReflector
java.lang.Exception
protected boolean isWriteableImpl(java.lang.Object bean, java.lang.String propertyName) throws java.lang.Exception
BaseReflector
BeanReflector.isWriteable(Object, String)
.
Default implementation assumes that all readable properties are also
writeable. One exception to this is when this reflector is an
IndexedContainerReflector but not a MutableIndexedContainerReflector, in
which case no properties are considered writeable.
isWriteableImpl
in class BaseReflector
java.lang.Exception
protected void setImpl(java.lang.Object bean, java.lang.String propertyName, java.lang.Object value) throws java.lang.Exception
BaseReflector
BeanReflector.set(Object, String, Object)
.
Implementation automatically provided for
MutableIndexedContainerReflectors. For other reflectors, throws an
UnsupportedOperationException.
setImpl
in class BaseReflector
java.lang.Exception
protected java.util.Iterator getIteratorImpl(java.lang.Object container) throws java.lang.Exception
BaseReflector
ContainerReflector.getIterator(Object)
.
getIteratorImpl
in class BaseReflector
java.lang.Exception
protected java.lang.Class getContainedTypeImpl(java.lang.Class clazz) throws java.lang.Exception
BaseReflector
ContainerReflector.getContainedType(Class)
.
getContainedTypeImpl
in class BaseReflector
java.lang.Exception
protected int getSizeImpl(java.lang.Object container) throws java.lang.Exception
BaseReflector
SizableReflector.getSize(Object)
.
getSizeImpl
in class BaseReflector
java.lang.Exception
protected boolean addImpl(java.lang.Object container, java.lang.Object value) throws java.lang.Exception
BaseReflector
GrowableContainer.add(Object)
.
addImpl
in class BaseReflector
java.lang.Exception
protected java.lang.Object getImpl(java.lang.Object container, int index) throws java.lang.Exception
BaseReflector
IndexedContainerReflector.get(Object, int)
.
getImpl
in class BaseReflector
java.lang.Exception
protected java.lang.Object setImpl(java.lang.Object container, int index, java.lang.Object propertyValue) throws java.lang.Exception
BaseReflector
MutableIndexedContainerReflector.set(Object, int, Object)
.
setImpl
in class BaseReflector
java.lang.Exception
protected java.lang.Object newInstanceImpl(java.lang.Class clazz, java.lang.Object parameters) throws java.lang.Exception
BaseReflector
InstantiatingReflector.newInstance(Class, Object)
.
Default implementation returns a new instance of the given class by
calling Class#newInstance())
.
newInstanceImpl
in class BaseReflector
java.lang.Exception
public boolean isReflectableImpl(java.lang.Class reflectedType, java.lang.Class reflectorType) throws ReflectionException
BaseReflector
BaseReflector.isReflectable(Class, Class)
.
isReflectableImpl
in class BaseReflector
ReflectionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |