Class ModelViewerTools<V>
java.lang.Object
de.aristaflow.adept2.model.common.viewer.ModelViewerTools<V>
- Type Parameters:
V- The viewer type.
Tool class for easier handling of some stuff like localisations or
parameter references / system data consumers.
- Author:
- Kevin Goeser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns all attributes of the viewer class.Returns the names of the attributes which are localised.Returns the names of the attributes which are system data consumers.static booleanisComplexAttribute(Class<?> clazz) voidsetTranslation(String attribute, Map<String, String> translations) Set the translations for
-
Constructor Details
-
ModelViewerTools
Default constructor.- Parameters:
viewer-attributes-
-
ModelViewerTools
Internal constructor, allowing to set a prefix, e.g. for nested views.- Parameters:
viewer-prefix-attributes-
-
-
Method Details
-
getLocalisedAttributes
Returns the names of the attributes which are localised.- Returns:
- The names of the attributes which are localised.
-
setTranslation
Set the translations for- Parameters:
attribute- The attribute to be translated.translations-
-
getSystemDataConsumerAttributes
Returns the names of the attributes which are system data consumers.- Returns:
- The names of the attributes which are system data consumers.
-
getAttributes
Returns all attributes of the viewer class.- Returns:
- All attributes of the viewer class.
-
getAttributeGetters
- Returns:
- All getter methods by attribute.
-
getComplexMethods
- Returns:
- The getter methods of the complex attributes.
-
isComplexAttribute
-