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_JAVA8
To use java 8 new syntax and api in generation.
|
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_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.
|
static String |
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_CLASS_NAME_PREFIX
To add a prefix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_CLASS_NAME_SUFFIX
To add a prefix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_DEFAULTS_CLASS_NAME_PREFIX
To add a prefix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_DEFAULTS_CLASS_NAME_SUFFIX
To add a suffix on the name of each generated bean class.
|
static String |
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_DEFAULTS_SUPER_CLASS
Tag value to use a super super-class for generated defaults class of a simple bean.
|
static String |
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_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, findBooleanTagValue, findDirectTagValue, findNullableBooleanTagValue, findTagValue, getDefaultValue, getDefinition, getDefinition, getDefinitionForMatcher, init, initDefinition, initMatcher, isDeprecated, isVerbose, scanClass, setVerbose, validatepublic static final String TAG_BEAN_SUPER_CLASS
JavaTemplatesStereoTypes.STEREOTYPE_SKIP_GENERATE_PROPERTY_CHANGE_SUPPORT),
then your class must provide everything 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> T getChild(Collection<T> list, int index) {
return CollectionUtil.getOrNull(list, index);
}
protected <T> T getChild(List<T> 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
JavaTemplatesStereoTypes.STEREOTYPE_SKIP_GENERATE_PROPERTY_CHANGE_SUPPORT,
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> T getChild(Collection<T> list, int index) {
return CollectionUtil.getOrNull(list, index);
}
protected <T> T getChild(List<T> 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_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_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 final String TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_SUPER_CLASS
JavaTemplatesStereoTypes.STEREOTYPE_SKIP_GENERATE_PROPERTY_CHANGE_SUPPORT,
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> T getChild(Collection<T> list, int index) {
return CollectionUtil.getOrNull(list, index);
}
protected <T> T getChild(List<T> 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_WITH_NO_INTERFACE_DEFAULTS_SUPER_CLASS
public static final String TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_CLASS_NAME_PREFIX
public static final String TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_CLASS_NAME_SUFFIX
public static final String TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_DEFAULTS_CLASS_NAME_PREFIX
public static final String TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_DEFAULTS_CLASS_NAME_SUFFIX
public static final String TAG_JAVA8
isUseJava8(ObjectModel),
Constant Field Valuespublic 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 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 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 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 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 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 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 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 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 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_SUFFIXpublic String getSimpleBeanWithNoInterfaceSuperClassTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_WITH_NO_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_WITH_NO_INTERFACE_SUPER_CLASSpublic String getSimpleBeanWithNoInterfaceDefaultsSuperClassTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_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_WITH_NO_INTERFACE_DEFAULTS_SUPER_CLASSpublic String getSimpleBeanWithNoInterfaceClassNamePrefixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_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_WITH_NO_INTERFACE_CLASS_NAME_PREFIXpublic String getSimpleBeanWithNoInterfaceClassNameSuffixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_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_WITH_NO_INTERFACE_CLASS_NAME_SUFFIXpublic String getSimpleBeanWithNoInterfaceDefaultsClassNamePrefixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_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_WITH_NO_INTERFACE_DEFAULTS_CLASS_NAME_PREFIXpublic String getSimpleBeanWithNoInterfaceDefaultsClassNameSuffixTagValue(ObjectModelClassifier classifier, ObjectModelPackage aPackage, ObjectModel model)
TAG_SIMPLE_BEAN_WITH_NO_INTERFACE_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_WITH_NO_INTERFACE_DEFAULTS_CLASS_NAME_SUFFIXpublic boolean isUseJava8(ObjectModel model)
TAG_JAVA8 tag value on the given model.model - model to seektrue the none empty value of the found tag value or false if not found nor empty.TAG_JAVA8Copyright © 2012–2016 CodeLutin. All rights reserved.