org.apache.commons.clazz.bean
Class BeanClazzProperty

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

public class BeanClazzProperty
extends ClazzFeatureSupport
implements org.apache.commons.clazz.ClazzProperty

Version:
$Id: BeanClazzProperty.java,v 1.5 2004/02/19 23:58:38 scolebourne Exp $
Author:
Dmitri Plotnikov

Constructor Summary
BeanClazzProperty(org.apache.commons.clazz.Clazz declaringClazz, String name)
           
BeanClazzProperty(org.apache.commons.clazz.Clazz declaringClazz, String name, String type)
           
 
Method Summary
 Object get(Object instance)
           
 org.apache.commons.clazz.Clazz getClazz()
          Returns the property type.
 org.apache.commons.clazz.Clazz getContentClazz()
          Gets the type of the item if the property isCollection() or isMap().
 org.apache.commons.clazz.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(org.apache.commons.clazz.Clazz declaringClazz,
                         String name)

BeanClazzProperty

public BeanClazzProperty(org.apache.commons.clazz.Clazz declaringClazz,
                         String name,
                         String type)
Method Detail

getName

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

Specified by:
getName in interface org.apache.commons.clazz.ClazzProperty
Returns:
String
See Also:
ClazzProperty.getName()

getClazz

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

Specified by:
getClazz in interface org.apache.commons.clazz.ClazzProperty
See Also:
ClazzProperty.getClazz()

isCollection

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

Specified by:
isCollection in interface org.apache.commons.clazz.ClazzProperty

isMap

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

Specified by:
isMap in interface org.apache.commons.clazz.ClazzProperty

getContentClazz

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

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

getKeyClazz

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

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

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface org.apache.commons.clazz.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 org.apache.commons.clazz.ClazzProperty
See Also:
ClazzProperty.get(java.lang.Object)

set

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


Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.