org.apache.commons.clazz.bean
Class BeanClazzProperty

java.lang.Object
  extended by org.apache.commons.clazz.common.ClazzElementSupport
      extended by org.apache.commons.clazz.common.ClazzFeatureSupport
          extended by org.apache.commons.clazz.bean.BeanClazzProperty
All Implemented Interfaces:
ClazzElement, ClazzFeature, ClazzProperty

public class BeanClazzProperty
extends ClazzFeatureSupport
implements ClazzProperty

Version:
$Id: BeanClazzProperty.java 155436 2005-02-26 13:17:48Z dirkv $
Author:
Dmitri Plotnikov

Constructor Summary
BeanClazzProperty(Clazz declaringClazz, String name)
           
BeanClazzProperty(Clazz declaringClazz, String name, String type)
           
 
Method Summary
 Object get(Object instance)
           
 Clazz getClazz()
          Returns the property type.
 Clazz getContentClazz()
          Gets the type of the item if the property isCollection() or isMap().
 Clazz getKeyClazz()
          Gets the type of the key if the property isMap().
 String getName()
          Returns the name of the property.
 boolean isCollection()
          Returns true if the property is a collection.
 boolean isMap()
          Returns true if the property is a map.
 boolean isReadOnly()
           
 void set(Object instance, Object value)
           
 
Methods inherited from class org.apache.commons.clazz.common.ClazzFeatureSupport
getDeclaringClazz
 
Methods inherited from class org.apache.commons.clazz.common.ClazzElementSupport
getAttribute, getAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.clazz.ClazzFeature
getDeclaringClazz
 
Methods inherited from interface org.apache.commons.clazz.ClazzElement
getAttribute, getAttributes
 

Constructor Detail

BeanClazzProperty

public BeanClazzProperty(Clazz declaringClazz,
                         String name)

BeanClazzProperty

public BeanClazzProperty(Clazz declaringClazz,
                         String name,
                         String type)
Method Detail

getName

public String getName()
Description copied from interface: ClazzProperty
Returns the name of the property.

Specified by:
getName in interface ClazzProperty
Returns:
String
See Also:
ClazzProperty.getName()

getClazz

public Clazz getClazz()
Description copied from interface: ClazzProperty
Returns the property type.

Specified by:
getClazz in interface ClazzProperty
See Also:
ClazzProperty.getClazz()

isCollection

public boolean isCollection()
Returns true if the property is a collection.

Specified by:
isCollection in interface ClazzProperty

isMap

public boolean isMap()
Returns true if the property is a map.

Specified by:
isMap in interface ClazzProperty

getContentClazz

public Clazz getContentClazz()
Description copied from interface: ClazzProperty
Gets the type of the item if the property isCollection() or isMap().

Specified by:
getContentClazz in interface ClazzProperty
Returns:
the type of the item
See Also:
ClazzProperty.getContentClazz()

getKeyClazz

public Clazz getKeyClazz()
Description copied from interface: ClazzProperty
Gets the type of the key if the property isMap().

Specified by:
getKeyClazz in interface ClazzProperty
Returns:
the type of the key
See Also:
ClazzProperty.getKeyClazz()

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface ClazzProperty
Returns:
true if the property can not be changed
See Also:
ClazzProperty.isReadOnly()

get

public Object get(Object instance)
Specified by:
get in interface ClazzProperty
See Also:
ClazzProperty.get(java.lang.Object)

set

public void set(Object instance,
                Object value)
Specified by:
set in interface ClazzProperty
See Also:
ClazzProperty.set(Object, Object)


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.