|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.beans.BeanChangeSupport
org.progeeks.meta.AbstractMetaObject
public abstract class AbstractMetaObject
An abstract meta-object implementation making it easier to create kit-specific meta-object adapters. Hooks are provided to allow subclasses to override specific functionality that may be important to a meta-kit implementation. Subclasses must provide, at the minimum, getPropertyValue() and setPropertyValue() methods.
Nested Class Summary | |
---|---|
protected class |
AbstractMetaObject.BaseListMutator
Overridden to provide access to a firePropertyChange() method. |
Constructor Summary | |
---|---|
protected |
AbstractMetaObject()
So that subclasses can be serializable without this class having to be. |
protected |
AbstractMetaObject(MetaClass metaClass,
MetaKit metaKit)
Creates a meta-object that will use the specified meta-kit and meta-class. |
protected |
AbstractMetaObject(MetaKit metaKit)
Creates a meta-object that will use the specified meta-kit. |
Method Summary | |
---|---|
protected void |
cacheWrapper(java.lang.String name,
java.lang.Object value)
Sticks a wrapped value into the wrapper cache. |
protected ListMutator |
createListMutator(java.lang.String name,
ListPropertyType type)
Creates a ListMutator for the specified property. |
protected PropertyMutator |
createPropertyMutator(java.lang.String name)
Creates a PropertyMutator for the specified property. |
protected java.lang.Object |
getCachedWrapper(java.lang.String name)
Retrieves a wrapped value from the wrapper cache. |
MetaClass |
getMetaClass()
Returns the meta-class associated with this object. |
MetaKit |
getMetaKit()
Returns the meta-kit for this meta-object's implementation layer. |
java.lang.Object |
getProperty(java.lang.String name)
Returns the value of the specified property. |
PropertyMutator |
getPropertyMutator(java.lang.String name)
Returns a mutator for the specified property. |
protected abstract java.lang.Object |
getPropertyValue(java.lang.String name)
Overridden by subclasses to provide implementation-specific field-level access. |
protected MetaClass |
readMetaClass(java.io.ObjectInputStream stream)
Can be used by subclasses to read a meta-class in a way specified by the current serialization policy configuration. |
protected java.lang.Object |
readResolve()
|
void |
release()
Releases any internal resources that may be held by the underlying implementation. |
protected void |
setMetaClass(MetaClass metaClass)
Called by subclasses to set the meta-class when setting it on the constructor is not possible. |
protected void |
setMetaKit(MetaKit metaKit)
Called by subclasses to set the meta-kit when setting it on the constructor is not possible. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets the value of the specified property. |
protected abstract java.lang.Object |
setPropertyValue(java.lang.String name,
java.lang.Object value)
Overridden by subclasses to provide implementation-specific field-level access. |
protected java.lang.Object |
unwrapPropertyValue(java.lang.String name,
java.lang.Object value,
PropertyType type)
Unwraps the object as appropriate to pass to the internal setPropertyValue() method or returns the original value if no unwrapping is needed. |
protected java.lang.Object |
wrapPropertyValue(java.lang.String name,
PropertyType type,
java.lang.Object value)
Wraps the object as appropriate to return to a caller or returns the original value if no wrapping is needed. |
protected void |
writeMetaClass(java.io.ObjectOutputStream stream)
Can be used by subclasses to write this object's meta-class in a way specified by the current serialization policy configuration. |
protected java.lang.Object |
writeReplace()
Stores an instance of this object in the context MetaObjectCache for later retrieval. |
Methods inherited from class org.progeeks.util.beans.BeanChangeSupport |
---|
addPropertyChangeListener, addPropertyChangeListener, clearAllListeners, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, hasListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.progeeks.meta.MetaObject |
---|
addPropertyChangeListener, addPropertyChangeListener, clearAllListeners, hasListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
---|
protected AbstractMetaObject()
protected AbstractMetaObject(MetaClass metaClass, MetaKit metaKit)
protected AbstractMetaObject(MetaKit metaKit)
Method Detail |
---|
public void release()
release
in interface MetaObject
protected void setMetaClass(MetaClass metaClass)
protected void setMetaKit(MetaKit metaKit)
protected abstract java.lang.Object setPropertyValue(java.lang.String name, java.lang.Object value)
protected abstract java.lang.Object getPropertyValue(java.lang.String name)
protected void cacheWrapper(java.lang.String name, java.lang.Object value)
protected java.lang.Object getCachedWrapper(java.lang.String name)
protected java.lang.Object wrapPropertyValue(java.lang.String name, PropertyType type, java.lang.Object value)
protected java.lang.Object unwrapPropertyValue(java.lang.String name, java.lang.Object value, PropertyType type)
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface MetaObject
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface MetaObject
public PropertyMutator getPropertyMutator(java.lang.String name)
getPropertyMutator
in interface MetaObject
public MetaClass getMetaClass()
getMetaClass
in interface MetaObject
public MetaKit getMetaKit()
getMetaKit
in interface MetaObject
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException
java.io.ObjectStreamException
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
protected void writeMetaClass(java.io.ObjectOutputStream stream) throws java.io.IOException
java.io.IOException
protected MetaClass readMetaClass(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
protected PropertyMutator createPropertyMutator(java.lang.String name)
protected ListMutator createListMutator(java.lang.String name, ListPropertyType type)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |