|
|||||||||
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.util.RemappedMetaObject
public class RemappedMetaObject
A meta-object wrapper that translates property names based on a mapping. Note that property change listeners for the wrapped object still report changes using the wrapped object's property names. Property change listeners registered with this wrapper will receive change events with the mapped names. In addition, this implementation currently makes no attempt to validate the meta-classes of the mappings to make sure that they are compatible.
Constructor Summary | |
---|---|
RemappedMetaObject(MetaObject metaObject,
MetaClass metaClass,
java.util.Map propertyNameMap)
Constructor that wraps the supplied meta-object and presents to be the given meta-class using the supplied mappings to translate property names. |
Method Summary | |
---|---|
MetaClass |
getMetaClass()
Returns the meta-class of this object (not the wrapped one). |
MetaKit |
getMetaKit()
Returns the meta-kit for this meta-object's implementation layer. |
java.lang.Object |
getProperty(java.lang.String name)
Get the specified property by finding out what property it maps to in the wrapped object and getting it from that object. |
PropertyMutator |
getPropertyMutator(java.lang.String name)
Get the property mutator for the given property. |
void |
release()
Releases any internal resources that may be held by the underlying implementation. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set the specified property by finding out what property it maps to in the wrapped object and sending it on. |
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 |
---|
public RemappedMetaObject(MetaObject metaObject, MetaClass metaClass, java.util.Map propertyNameMap)
metaObject
- Meta-object to remap.metaClass
- Meta-class this remapped object should be.propertyNameMap
- Mapping of meta-class property names to
wrapped object property names.Method Detail |
---|
public void release()
release
in interface MetaObject
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface MetaObject
MetaObject.setProperty(java.lang.String, java.lang.Object)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface MetaObject
MetaObject.getProperty(java.lang.String)
public PropertyMutator getPropertyMutator(java.lang.String name)
getPropertyMutator
in interface MetaObject
MetaObject.getPropertyMutator(java.lang.String)
public MetaClass getMetaClass()
getMetaClass
in interface MetaObject
MetaObject.getMetaClass()
public MetaKit getMetaKit()
MetaObject
getMetaKit
in interface MetaObject
MetaObject.getMetaKit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |