org.apache.commons.clazz
Interface ClazzProperty

All Superinterfaces:
ClazzElement, ClazzFeature
All Known Subinterfaces:
ReflectedProperty
All Known Implementing Classes:
BeanClazzProperty, ReflectedAccessorPairProperty, ReflectedListProperty, ReflectedMappedProperty, ReflectedScalarProperty

public interface ClazzProperty
extends ClazzFeature

Describes a Property of instances of a Clazz.

Version:
$Id: ClazzProperty.java 155436 2005-02-26 13:17:48Z dirkv $
Author:
Dmitri Plotnikov, Stephen Colebourne

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 interface org.apache.commons.clazz.ClazzFeature
getDeclaringClazz
 
Methods inherited from interface org.apache.commons.clazz.ClazzElement
getAttribute, getAttributes
 

Method Detail

getName

String getName()
Returns the name of the property.

Returns:
String

getClazz

Clazz getClazz()
Returns the property type.


isCollection

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


isMap

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


getContentClazz

Clazz getContentClazz()
Gets the type of the item if the property isCollection() or isMap().

Returns:
the type of the item

getKeyClazz

Clazz getKeyClazz()
Gets the type of the key if the property isMap().

Returns:
the type of the key

isReadOnly

boolean isReadOnly()
Returns:
true if the property can not be changed

get

Object get(Object instance)

set

void set(Object instance,
         Object value)


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