org.constretto.annotation
Annotation Type Configuration


@Target(value={PARAMETER,FIELD})
@Retention(value=RUNTIME)
@Inherited
public @interface Configuration

This annotation is picked up by Constretto, and applies to fields that are declared as private, public or default, including those inherited from superclasses.

Author:
Kaare Nilsen

Optional Element Summary
 java.lang.String defaultValue
          States the default value to be injected if no value found associated for the expression specified in the expression attribute.
 java.lang.Class<? extends ConfigurationDefaultValueFactory<?>> defaultValueFactory
          Use when more complex default values needs to be injected of no value found associated with the expression specified in the expression attribute
 java.lang.String description
          A description of the usage of the property.
 java.lang.String expression
          The expression of the property to lookup in constretto.
 boolean required
          Declares whether it is required to find the specified property key.
 

expression

public abstract java.lang.String expression
The expression of the property to lookup in constretto.

It is important that environment prefixes is not used in this attribute

Default:
""

description

public abstract java.lang.String description
A description of the usage of the property. Not directly used in the runtime environment, but may be useful for documentation or monitoring situations

Default:
""

defaultValue

public abstract java.lang.String defaultValue
States the default value to be injected if no value found associated for the expression specified in the expression attribute.

When a default value is set, the required attribute will be ignored.

Default:
"N/A"

defaultValueFactory

public abstract java.lang.Class<? extends ConfigurationDefaultValueFactory<?>> defaultValueFactory
Use when more complex default values needs to be injected of no value found associated with the expression specified in the expression attribute

Default:
org.constretto.annotation.Configuration.EmptyValueFactory.class

required

public abstract boolean required
Declares whether it is required to find the specified property key.

Defaults to true.

Default:
true


Copyright © 2008-2011. All Rights Reserved.