|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.property.impl.AbstractModelElement | +--org.joda.property.impl.AbstractProperty | +--org.joda.property.impl.type.DefaultClassProperty
Default implementation of a Class property.
Data is stored in the associated PropertyData object as a Class object. This is immutable so can be directly returned.
Nested Class Summary |
Nested classes inherited from class org.joda.property.Property |
Property.Internal |
Constructor Summary | |
DefaultClassProperty()
Constructor |
Method Summary | |
protected java.lang.Class |
convertObjectToClass(java.lang.Object object)
Convert an Object to a Class, throwing an exception if unable to convert. |
java.lang.Class |
get()
Get the property's value as a Class. |
protected java.lang.Class |
getInternal()
Get the property as a Class |
java.lang.Class |
getPropertyType()
Get the type of the property. |
java.lang.Object |
newInstance()
Create a new instance of the class. |
void |
set(java.lang.Object propertyValue)
Set the property's value as an object. |
protected void |
setInternal(java.lang.Class newValue)
Set the property value as a Class |
java.lang.Class |
toClass()
Get the property's value as a Class. |
java.lang.Object |
toObject()
Get the property's value as an object. |
Methods inherited from class org.joda.property.impl.AbstractProperty |
addPropertyChangeListener, bean, checkArgumentNotNull, checkModifiable, checkValueNotNull, checkValueNotNull, cloneDeep, convertObject, createClonedProperty, data, equals, equalsValue, firePropertyChange, firePropertyChange, getContentName, getContentType, getPropertyName, getThis, hashCode, initBeanCreated, initPropertyCreated, isModifiable, isNull, isReadOnly, populateClonedProperty, removePropertyChangeListener, setModifiable, setReadOnly, toDataString, toString |
Methods inherited from class org.joda.property.impl.AbstractModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.joda.property.type.DataProperty |
toDataString |
Methods inherited from interface org.joda.property.Property |
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getContentName, getContentType, getPropertyName, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, setModifiable, setReadOnly, toString |
Methods inherited from interface org.joda.property.ModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
Constructor Detail |
public DefaultClassProperty()
Method Detail |
public java.lang.Class getPropertyType()
getPropertyType
in interface Property
protected java.lang.Class getInternal()
protected void setInternal(java.lang.Class newValue)
newValue
- the value to storepublic java.lang.Object toObject()
Property
This method has strong semantics such that where a and b are
properties of the same type, it must be true that:
b.set( a.toObject() );
a.equals(b);
In other words, the object contains all the data necessary to
recreate the property's value.
toObject
in interface Property
toObject
in class AbstractProperty
Property#toObject()
public java.lang.Class toClass()
ClassProperty
toClass
in interface ClassProperty
ClassProperty.toClass()
public java.lang.Class get()
ClassProperty
get
in interface ClassProperty
ClassProperty.get()
protected java.lang.Class convertObjectToClass(java.lang.Object object)
object
- the value to convert
public void set(java.lang.Object propertyValue)
Property
If a String is passed in, it can be parsed in various ways. If the results of toDataString() are passed in, it must reconstitute the original value.
set
in interface Property
set
in class AbstractProperty
propertyValue
- an Object to set the property's value toProperty#set(Object)
public java.lang.Object newInstance()
ClassProperty
newInstance
in interface ClassProperty
ClassProperty.newInstance()
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |