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
-
-
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 booleanisComplexAttribute(Class<?> clazz)voidsetTranslation(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)
-
-