net.sf.eos.config
Annotation Type ConfigurationKey


@Documented
@Retention(value=RUNTIME)
@Target(value=FIELD)
@Experimental
public @interface ConfigurationKey

Indicates that a field name is a key of the Configuration data. The annotation describes the usage of the configuration parameter.

The ConfigurationKey annotation is an convention. Only fields with

should be annotated. Note, that the compiler couldn't check this conventions. Other tools like apt implementation should do the checking job.

Author:
Sascha Kohlmann

Optional Element Summary
 String defaultValue
          The default value of the configuration parameter.
 String description
          The description of the configuration parameter.
 ConfigurationKey.Type type
          The type of the configuration parameter.
 Class<? extends Predicate<String>> validator
          A predicate to valid the configuration value.
 

description

public abstract String description
The description of the configuration parameter.

Default:
""

defaultValue

public abstract String defaultValue
The default value of the configuration parameter.

Default:
""

type

public abstract ConfigurationKey.Type type
The type of the configuration parameter.

Default:
STRING

validator

public abstract Class<? extends Predicate<String>> validator
A predicate to valid the configuration value. default returns always true.

Default:
net.sf.eos.config.ConfigurationKey.AlwaysTruePredicate.class


Copyright © 2008. All Rights Reserved.