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