org.nakedobjects.applib.annotation
Annotation Type Parseable


@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
 java.lang.Class<?> parserClass
          As per parserName(), but specifying a class literal rather than a fully qualified class name.
 java.lang.String parserName
          The fully qualified name of a class that implements the Parser interface.
 

parserName

public abstract java.lang.String parserName
The fully qualified name of a class that implements the 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.

Default:
""

parserClass

public abstract java.lang.Class<?> parserClass
As per 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.

Default:
org.nakedobjects.applib.annotation.Parseable.class


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.