|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.guix.tags.DefaultTagHandler
public abstract class DefaultTagHandler
Default TagHandler, containing common methods for all the tags
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
attrMap
Maps the common name for an attribute with its real name for the class to generate |
protected java.beans.BeanInfo |
beanInfo
The JAXXBeanInfo for the beanClass. |
| Constructor Summary | |
|---|---|
DefaultTagHandler()
|
|
| Method Summary | |
|---|---|
void |
addProxyEventInfo(java.lang.String memberName,
java.lang.Class listenerClass)
Configures a proxy event handler which fires PropertyChangeEvents when a non-bound
member is updated. |
void |
addProxyEventInfo(java.lang.String memberName,
java.lang.Class listenerClass,
java.lang.String modelName)
Configures a proxy event handler which fires PropertyChangeEvents when a non-bound
member is updated. |
void |
addProxyEventInfo(java.lang.String memberName,
java.lang.Class listenerClass,
java.lang.String modelName,
java.lang.String addMethod,
java.lang.String removeMethod)
Configures a proxy event handler which fires PropertyChangeEvents when a non-bound
member is updated. |
protected void |
configureProxyEventInfo()
Configures the event handling for members which do not fire PropertyChangeEvent when
modified. |
java.lang.String |
getAttrToGenerate(java.lang.String attr)
|
java.lang.String |
getDefaultConstructor()
|
java.lang.String |
getEventInfosAddListenerMethodName(java.lang.String methodName)
|
java.lang.Class |
getEventInfosListenerClass(java.lang.String methodName)
|
java.lang.String |
getEventInfosModelName(java.lang.String methodName)
|
java.lang.String |
getEventInfosRemoveListenerMethodName(java.lang.String methodName)
|
boolean |
hasEventInfosAboutMethod(java.lang.String methodName)
|
protected void |
init()
Performs introspection on the beanClass and stores the results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nuiton.guix.tags.TagHandler |
|---|
getClassToGenerate |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,java.lang.String> attrMap
protected java.beans.BeanInfo beanInfo
| Constructor Detail |
|---|
public DefaultTagHandler()
| Method Detail |
|---|
protected void init()
throws java.beans.IntrospectionException
java.beans.IntrospectionException - TODOprotected void configureProxyEventInfo()
PropertyChangeEvent when
modified. The default implementation does nothing. Subclasses should override this method to call
addProxyEventInfo for each member which requires special handling.
public void addProxyEventInfo(java.lang.String memberName,
java.lang.Class listenerClass)
PropertyChangeEvents when a non-bound
member is updated. This is necessary for all fields (which cannot be bound) and for methods that are
not bound property get methods. The proxy event handler will attach the specified kind
of listener to the class and fire a PropertyChangeEvent whenever the listener receives
any kind of event.
Even though this method can theoretically be applied to fields (in addition to methods), it would be an
unusual situation in which that would actually work -- as fields cannot fire events when modified, it would
be difficult to have a listener that was always notified when a field value changed.
memberName - the name of the field or method being proxiedlistenerClass - the type of listener which receives events when the field or method is updated
public void addProxyEventInfo(java.lang.String memberName,
java.lang.Class listenerClass,
java.lang.String modelName)
PropertyChangeEvents when a non-bound
member is updated. This is necessary for all fields (which cannot be bound) and for methods that are
not bound property get methods. This variant attaches a listener to a property of the
object (such as model) and not the object itself, which is useful when there is a model
that is the "real" container of the information. The proxy event handler will attach the specified kind
of listener to the property's value (retrieved using the property's get method) and fire
a PropertyChangeEvent whenever the listener receives any kind of event.
If the property is itself bound (typically the case with models), any updates to the property's value will
cause the listener to be removed from the old property value and reattached to the new property value,
as well as cause a PropertyChangeEvent to be fired.
Even though this method can theoretically be applied to fields (in addition to methods), it would be an
unusual situation in which that would actually work -- as fields cannot fire events when modified, it would
be difficult to have a listener that was always notified when a field value changed.
memberName - the name of the field or method being proxiedlistenerClass - the type of listener which receives events when the field or method is updatedmodelName - the JavaBeans-style name of the model property
public void addProxyEventInfo(java.lang.String memberName,
java.lang.Class listenerClass,
java.lang.String modelName,
java.lang.String addMethod,
java.lang.String removeMethod)
PropertyChangeEvents when a non-bound
member is updated. This is necessary for all fields (which cannot be bound) and for methods that are
not bound property get methods. This variant attaches a listener to a property of the
object (such as model) and not the object itself, which is useful when there is a model
that is the "real" container of the information. The proxy event handler will attach the specified kind
of listener to the property's value (retrieved using the property's get method) and fire
a PropertyChangeEvent whenever the listener receives any kind of event.
If the property is itself bound (typically the case with models), any updates to the property's value will
cause the listener to be removed from the old property value and reattached to the new property value,
as well as cause a PropertyChangeEvent to be fired.
This variant of addProxyEventInfo allows the names of the methods that add and remove
the event listener to be specified, in cases where the names are not simply add<listenerClassName>
and remove<listenerClassName>.
Even though this method can theoretically be applied to fields (in addition to methods), it would be an
unusual situation in which that would actually work -- as fields cannot fire events when modified, it would
be difficult to have a listener that was always notified when a field value changed.
memberName - the name of the field or method being proxiedlistenerClass - the type of listener which receives events when the field or method is updatedmodelName - the JavaBeans-style name of the model propertyaddMethod - add method nameremoveMethod - remove method namepublic boolean hasEventInfosAboutMethod(java.lang.String methodName)
hasEventInfosAboutMethod in interface TagHandlerpublic java.lang.Class getEventInfosListenerClass(java.lang.String methodName)
getEventInfosListenerClass in interface TagHandlerpublic java.lang.String getEventInfosAddListenerMethodName(java.lang.String methodName)
getEventInfosAddListenerMethodName in interface TagHandlerpublic java.lang.String getEventInfosRemoveListenerMethodName(java.lang.String methodName)
getEventInfosRemoveListenerMethodName in interface TagHandlerpublic java.lang.String getEventInfosModelName(java.lang.String methodName)
getEventInfosModelName in interface TagHandlerpublic java.lang.String getAttrToGenerate(java.lang.String attr)
getAttrToGenerate in interface TagHandlerpublic java.lang.String getDefaultConstructor()
getDefaultConstructor in interface TagHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||