org.jcon.data
Class IntrospectionProfile

java.lang.Object
  extended by org.jcon.data.IntrospectionProfile

public class IntrospectionProfile
extends java.lang.Object

This is a class which builds and holds various items of interest for introspectors. It is used e.g. by IntrospectionLib to obtain and cache information about classes.

Author:
Paul Reavis

Constructor Summary
IntrospectionProfile(java.lang.Class classy)
           
 
Method Summary
 java.util.Map getAllPropertyValues(java.lang.Object bean)
          Property values for all readable properties.
 java.util.ArrayList getEditableFields()
           
 java.util.Map getFieldDefs()
           
 java.lang.Class getProfiledClass()
           
 java.util.Map getPropertyDescriptors()
           
 java.lang.Object getPropertyValue(java.lang.Object bean, java.lang.String propertyName)
          Gets the value of the named property from the given object.
 java.util.Map getPropertyValues(java.lang.Object bean)
          Values for all editable properties.
 void setPropertyValue(java.lang.Object bean, java.lang.String propertyName, java.lang.Object value)
          Sets the named property on the given bean.
 void setPropertyValues(java.lang.Object bean, java.util.Map newProperties)
          Sets property values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntrospectionProfile

public IntrospectionProfile(java.lang.Class classy)
Method Detail

getPropertyValue

public final java.lang.Object getPropertyValue(java.lang.Object bean,
                                               java.lang.String propertyName)
Gets the value of the named property from the given object. Horks up an IllegalArgumentException if it can't.


setPropertyValue

public final void setPropertyValue(java.lang.Object bean,
                                   java.lang.String propertyName,
                                   java.lang.Object value)
Sets the named property on the given bean. Horks up an IllegalArgumentException if it can't, or doesn't like you. Uses hard coercion, so it won't be deterred easily.


getPropertyValues

public final java.util.Map getPropertyValues(java.lang.Object bean)
Values for all editable properties.


getAllPropertyValues

public final java.util.Map getAllPropertyValues(java.lang.Object bean)
Property values for all readable properties.


setPropertyValues

public final void setPropertyValues(java.lang.Object bean,
                                    java.util.Map newProperties)
Sets property values. Unlisted properties are set to null; to leave a property unchanged associate it with a LeaveAloneToken

Invalid properties are ignored.

Parameters:
newProperties - A dictionary of propertynames associated with their values.

getProfiledClass

public final java.lang.Class getProfiledClass()

getPropertyDescriptors

public final java.util.Map getPropertyDescriptors()

getFieldDefs

public final java.util.Map getFieldDefs()

getEditableFields

public final java.util.ArrayList getEditableFields()