Interface SizableReflector

All Superinterfaces:
net.sf.composite.Component, Reflector
All Known Subinterfaces:
BeanReflector, IndexedContainerReflector, MutableIndexedContainerReflector
All Known Implementing Classes:
ArrayReflector, BaseBeanReflector, BaseServletReflector, CollectionReflector, ContextReflector, DynaBeanReflector, HttpSessionAttributeReflector, ListReflector, MapReflector, ObjectReflector, PageContextAttributeReflector, ResetableIteratorWrapperReflector, ResultSetReflector, ServletContextAttributeReflector, ServletContextInitParameterReflector, ServletRequestAttributeReflector, ServletRequestParameterReflector, ServletRequestReflector, SetReflector, SimpleDelegatingReflector, SortedSetReflector, StringTokenizerReflector, StubbornDelegatingReflector, VelocityContextReflector, VelocityContextReflector

public interface SizableReflector
extends Reflector

A reflector that can tell how many elements are contained in a given object.

Dec 5, 2004
Matt Sgarlata

Field Summary
static java.lang.String IMPLICIT_PROPERTY_SIZE
Method Summary
 int getSize(java.lang.Object object)
          Returns the number of elements contained in a given object.
Methods inherited from interface net.sf.morph.reflect.Reflector
getReflectableClasses, getWrapper

Field Detail


static final java.lang.String IMPLICIT_PROPERTY_SIZE
See Also:
Constant Field Values
Method Detail


int getSize(java.lang.Object object)
            throws ReflectionException
Returns the number of elements contained in a given object. If the object is a bean, the number of properties is returned. If the object is a container, the number of elements in the container is returned.

object - the object
the number of elements contained in the given object
ReflectionException - if object is null or the number of elements in the object could not be determined

Copyright © 2004-2008.