The <representation> tag may be used to declare a representation space element within a space. Declaring of a representation is usually done within a module which provides the Java class definition of that representation. Any immutable Java class may be used as a representation. Java classes can be used as representation without being defined in this way however declaring a representation adds value because it allows richer metadata to be associated and this aids with documentation and with the expression of the representation within various tools such as the space explorer and visualizer.
A representation is declared in a space within a library with a <representation> tag within a space. The representation tag contains a <class> declaration tag which specifies the implementation Java class or interface which embodies the representation.
Additional tags can be optionally added to the representation declaration:
|name||This is the human readable name of the representation.|
|description||A short single sentence description of the representation.|
|id||(not normally used) This is overrides the default space element id which defaults to the fully qualified Java class name.|
For a representation to be useful outside the module in which it was defined the Java class which it specifies must be exposed by the classloader of that module. To do this ensure you have a classloader export definition: