public interface JavaTemplatesTagValues extends EugeneTagValues
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_BEAN_SUPER_CLASS
Tag value to use a super class for generated bean.
|
static String |
TAG_NO_PCS
Tag value to set if do not want any pcs (says PropertyChangeSupport in a generated bean).
|
static String |
TAG_SIMPLE_BEAN_CLASS_NAME_PREFIX
To add a prefix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_CLASS_NAME_SUFFIX
To add a prefix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_GENERATE_FACTORY
To generate an factory of generated simple beans.
|
static String |
TAG_SIMPLE_BEAN_GENERATE_INTERFACE
To generate an interface of each simple bean.
|
static String |
TAG_SIMPLE_BEAN_INTERFACE_NAME_PREFIX
To add a prefix on the name of each generated interface of a simple bean.
|
static String |
TAG_SIMPLE_BEAN_INTERFACE_NAME_SUFFIX
To add a prefix on the name of each generated interface of a simple bean.
|
static String |
TAG_SIMPLE_BEAN_INTERFACE_SUPER_CLASS
Tag value to use a super interface for generated interfaces on simple bean.
|
static String |
TAG_SIMPLE_BEAN_SUPER_CLASS
Tag value to use a super class for generated bean.
|
TAG_CONSTANT_PREFIX, TAG_DO_NOT_GENERATE_BOOLEAN_GET_METHODS, TAG_DOCUMENTATION, TAG_I18N_PREFIX, TAG_VERSIONstatic final String TAG_NO_PCS
static final String TAG_BEAN_SUPER_CLASS
TAG_NO_PCS on classifier or model,
then your class must provide evrything for it.
More over, if you use some collections in your bean you must also define
two method named getChild(Collection list, int index) and
getChild(List list, int index)
See new code to know minimum stuff to add in your class for this purpose.
public abstract class AbstractBean implements Serializable {
private static final long serialVersionUID = 1L;
protected final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
public void addPropertyChangeListener(PropertyChangeListener listener) {
pcs.addPropertyChangeListener(listener);
}
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
pcs.addPropertyChangeListener(propertyName, listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
pcs.removePropertyChangeListener(listener);
}
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
pcs.removePropertyChangeListener(propertyName, listener);
}
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
pcs.firePropertyChange(propertyName, oldValue, newValue);
}
protected void firePropertyChange(String propertyName, Object newValue) {
firePropertyChange(propertyName, null, newValue);
}
protected T getChild(Collection list, int index) {
return CollectionUtil.getOrNull(list, index);
}
protected T getChild(List list, int index) {
return CollectionUtil.getOrNull(list, index);
}
}
You can globaly use it on the complete model or to a specific classifier.static final String TAG_SIMPLE_BEAN_SUPER_CLASS
TAG_NO_PCS on classifier or model,
then your class must provide evrything for it.
More over, if you use some collections in your bean you must also define
two method named getChild(Collection list, int index) and
getChild(List list, int index)
See new code to know minimum stuff to add in your class for this purpose.
public abstract class AbstractBean implements Serializable {
private static final long serialVersionUID = 1L;
protected final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
public void addPropertyChangeListener(PropertyChangeListener listener) {
pcs.addPropertyChangeListener(listener);
}
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
pcs.addPropertyChangeListener(propertyName, listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
pcs.removePropertyChangeListener(listener);
}
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
pcs.removePropertyChangeListener(propertyName, listener);
}
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
pcs.firePropertyChange(propertyName, oldValue, newValue);
}
protected void firePropertyChange(String propertyName, Object newValue) {
firePropertyChange(propertyName, null, newValue);
}
protected T getChild(Collection list, int index) {
return CollectionUtil.getOrNull(list, index);
}
protected T getChild(List list, int index) {
return CollectionUtil.getOrNull(list, index);
}
}
You can globaly use it on the complete model or to a specific classifier.static final String TAG_SIMPLE_BEAN_CLASS_NAME_PREFIX
static final String TAG_SIMPLE_BEAN_CLASS_NAME_SUFFIX
static final String TAG_SIMPLE_BEAN_GENERATE_INTERFACE
static final String TAG_SIMPLE_BEAN_INTERFACE_SUPER_CLASS
static final String TAG_SIMPLE_BEAN_INTERFACE_NAME_PREFIX
static final String TAG_SIMPLE_BEAN_INTERFACE_NAME_SUFFIX
static final String TAG_SIMPLE_BEAN_GENERATE_FACTORY
Copyright © 2012-2013 CodeLutin. All Rights Reserved.