com.pholser.util.properties
Annotation Type DefaultsTo


@Documented
@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface DefaultsTo

Mark an interface method with this annotation to indicate a default value for the property source key represented by the method. If no property is associated with the key for the method, the default value will be returned instead. The default can be a plain value given by value() or a value comprised in whole or in part of the values of other properties, given by valueOf(). References to other properties in a valueOf() expression are delimited by [ and ]. Default values for aggregate types can use a separator given by ValuesSeparatedBy.

Author:
Paul Holser
See Also:
BoundProperty

Optional Element Summary
 String value
          String representation of the default value for the property source key associated with the marked method.
 String valueOf
          Expression to give the string representation of a default value for the properties file key associated with the marked method.
 

value

public abstract String value
String representation of the default value for the property source key associated with the marked method.

Returns:
a default value
Default:
""

valueOf

public abstract String valueOf
Expression to give the string representation of a default value for the properties file key associated with the marked method. This expression can be given in terms of property references.

Returns:
a default value expression
Default:
""


© Copyright 2009-2013 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. pholser@alumni.rice.edu