|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Inherited @Target(value=TYPE) @Retention(value=RUNTIME) public @interface Parseable
Indicates that the class can be parsed either by delegating to an Parser or through some
externally-configured mechanism.
| Optional Element Summary | |
|---|---|
Class<?> |
parserClass
As per parserName(), but specifying a class literal rather than a fully qualified class name. |
String |
parserName
The fully qualified name of a class that implements the Parser interface. |
public abstract String parserName
Parser interface.
This is optional because some implementations may pick up parseability via a configuration file either
for the framework itself, or through a viewer-specific configuration of a widget (eg a calendar view
for a date), or indeed through the equivalent parserClass().
It is common for value classes to act as their own parsers. Note that the framework requires that the nominated class provides a public no-arg constructor on the class. It instantiates an instance in order to do the parsing, uses the result and discards the instantiated object.
Implementation note: the default value provided here is simply the empty string because null is not a valid default.
public abstract Class<?> parserClass
parserName(), but specifying a class literal rather than a fully qualified class name.
Implementation note: the default value provided here is simply the Parseable's own class,
because null is not a valid default.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||