Package de.aristaflow.adept2.model.common.viewer
package de.aristaflow.adept2.model.common.viewer
Constraints for a viewer interface:
- It must be an interface.
- All methods must be annotated with
AttributeorAttributeSetter. - An attribute name must only be specified once for
Attributeand (optionally) once forAttributeSetter. - All setters must have a single parameter.
- All getters must not be
voidand must not take any parameter. - All parameters and return values must be of the types as
specified in
ModelViewer.allowedTypesArray, an enum or another view interface. - Naturally, the type of a setter must match the type of its getter.
- A getter may be marked as "localised", using
Attribute.localised(), this is only valid for string types.
The translations are expected to be found in[PluginPrefix.]AttributeName.LocaleString, where thePluginPrefixis the optional prefix for the attributes,AttributeNameis the name of the attribute as it is specified in theAttributeannotation andLocaleStringis the string representing the locale (e.g.deorde_DE.
Cf.ModelViewerToolsfor tool methods. - A getter may have the
SystemDataConsumerannotation, if it is of type int/Integer, long/Long or String. - An attribute name must not contain '[', ']' and '.'. Usage of alphabetical characters only is recommended.
- a RuntimeException is thrown, if e.g. a getter for an int
- RE on invalid string value for an enum
- RE on a string which is not a number
- A
UnresolvedParameterReferenceExceptionis thrown whenever an atomic non-string value can't be returned because a parameter reference is not resolved.
-
ClassDescriptionAnnotates a method of a view interface, including the name of the attribute.Type specialisation.Setter for the model viewer attribute.A description of the container...Allows the creation of typed views on attribute maps.Tool class for easier handling of some stuff like localisations or parameter references / system data consumers.Exception thrown when a value can't be returned because it can't be parsed because of parameter references, e.g.Checks the model viewer interfaces for consistent annotations.