org.spicefactory.cinnamon.reflect
Class Bean

java.lang.Object
  extended by org.spicefactory.cinnamon.reflect.Bean

public class Bean
extends Object

Represents a target bean and provides information on its properties. Bean instances will be created through ReflectionFactory instances.

Author:
Jens Halm

Method Summary
 Map<String,Property> getProperties()
          Returns a Map of all Properties of this Bean.
 Property getProperty(String name)
          Returns the Property instance for the given property name.
 Map<String,Property> getReadableProperties()
          Returns a Map containing all readable properties of this Bean.
 Class<?> getType()
          Returns the class of the bean.
 Map<String,Property> getWritableProperties()
          Returns a Map containing all writable properties of this Bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public Class<?> getType()
Returns the class of the bean.

Returns:
the class of the bean

getProperty

public Property getProperty(String name)
Returns the Property instance for the given property name.

Parameters:
name - the name of the bean property
Returns:
the Property instance for the given name or null if no such property exists

getProperties

public Map<String,Property> getProperties()
Returns a Map of all Properties of this Bean. The names of the properties are the keys of the Map and the matching Property instances are the values. This Map contains all properties, no matter if they are readable, writable or both.

Returns:
a Map of all Properties of this Bean

getReadableProperties

public Map<String,Property> getReadableProperties()
Returns a Map containing all readable properties of this Bean. The names of the properties are the keys of the Map and the matching Property instances are the values.

Returns:
a Map of all readable properties of this Bean

getWritableProperties

public Map<String,Property> getWritableProperties()
Returns a Map containing all writable properties of this Bean. The names of the properties are the keys of the Map and the matching Property instances are the values.

Returns:
a Map of all writable properties of this Bean