public class JavaTemplatesTagValues extends TagValueDefinitionProvider
|
| 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_DEFAULTS_CLASS_NAME_PREFIX
To add a prefix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_DEFAULTS_CLASS_NAME_SUFFIX
To add a suffix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_DEFAULTS_SUPER_CLASS
Tag value to use a super super-class for generated defaults class of a
simple bean.
|
static String |
TAG_SIMPLE_BEAN_GENERATE_DEFAULTS
To generate a factory of generated simple beans.
|
static String |
TAG_SIMPLE_BEAN_GENERATE_FACTORY
To generate a 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.
|
definition, deprecated, matcher, verbose| Constructor and Description |
|---|
JavaTemplatesTagValues() |
addAllDefinition, addAllDeprecated, addDefinition, addDeprecated, addMatcher, getDefaultValue, getDefinition, getDefinition, getDefinitionForMatcher, init, initDefinition, initMatcher, isDeprecated, isVerbose, scanClass, setVerbose, validatepublic static final String TAG_NO_PCS
isNoPCS(ObjectModelClassifier, ObjectModelPackage, ObjectModel),
Constant Field Valuespublic 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.public 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.public static final String TAG_SIMPLE_BEAN_CLASS_NAME_PREFIX
public static final String TAG_SIMPLE_BEAN_CLASS_NAME_SUFFIX
public static final String TAG_SIMPLE_BEAN_GENERATE_INTERFACE
public static final String TAG_SIMPLE_BEAN_INTERFACE_SUPER_CLASS
public static final String TAG_SIMPLE_BEAN_INTERFACE_NAME_PREFIX
public static final String TAG_SIMPLE_BEAN_INTERFACE_NAME_SUFFIX
public static final String TAG_SIMPLE_BEAN_GENERATE_FACTORY
isSimpleBeanGenerateFactory(ObjectModel),
Constant Field Valuespublic static final String TAG_SIMPLE_BEAN_GENERATE_DEFAULTS
public static final String TAG_SIMPLE_BEAN_DEFAULTS_SUPER_CLASS
public static final String TAG_SIMPLE_BEAN_DEFAULTS_CLASS_NAME_PREFIX
public static final String TAG_SIMPLE_BEAN_DEFAULTS_CLASS_NAME_SUFFIX
public static boolean isNoPCS(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_NO_PCS tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_NO_PCSpublic static String getBeanSuperClassTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_BEAN_SUPER_CLASS tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_BEAN_SUPER_CLASSpublic static String getSimpleBeanSuperClassTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_SUPER_CLASS tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_SUPER_CLASSpublic static boolean isSimpleBeanGenerateInterface(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_GENERATE_INTERFACE tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_GENERATE_INTERFACEpublic static boolean isSimpleBeanGenerateFactory(ObjectModel model)
TAG_SIMPLE_BEAN_GENERATE_FACTORY tag value on the given model or classifier.model - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_GENERATE_FACTORYpublic static String getSimpleBeanInterfaceSuperClassTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_INTERFACE_SUPER_CLASS tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_INTERFACE_SUPER_CLASSpublic static String getSimpleBeanClassNamePrefixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_CLASS_NAME_PREFIX tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_CLASS_NAME_PREFIXpublic static String getSimpleBeanClassNameSuffixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_CLASS_NAME_SUFFIX tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_CLASS_NAME_SUFFIXpublic static String getSimpleBeanInterfaceNamePrefixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_INTERFACE_NAME_PREFIX tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_INTERFACE_NAME_PREFIXpublic static String getSimpleBeanInterfaceNameSuffixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_INTERFACE_NAME_SUFFIX tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_INTERFACE_NAME_SUFFIXpublic static boolean isSimpleBeanGenerateDefaults(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_GENERATE_DEFAULTS tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_GENERATE_DEFAULTSpublic static String getSimpleBeanDefaultsSuperClassTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_DEFAULTS_SUPER_CLASS tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_DEFAULTS_SUPER_CLASSpublic static String getSimpleBeanDefaultsClassNamePrefixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_DEFAULTS_CLASS_NAME_PREFIX tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_DEFAULTS_CLASS_NAME_PREFIXpublic static String getSimpleBeanDefaultsClassNameSuffixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_DEFAULTS_CLASS_NAME_SUFFIX tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.
If not filled, then use default s value.classifier - classifier to seekmodel - model to seeknull if not found nor empty.TAG_SIMPLE_BEAN_DEFAULTS_CLASS_NAME_SUFFIXCopyright © 2012–2014 CodeLutin. All rights reserved.