|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Target(value=METHOD) @Retention(value=RUNTIME) public @interface PropertyExpression
Defines a default expression for the property to evaluate a value, if not specified otherwise.
The expression may contain a plain default value or the names of properties to evaluate prior to the translation of the evaluated value to the designated type. This type is determined by the return value of the annotated method of the interface. The value is always specified as a String
value.
Examples
@PropertySet("myprops") public interface MyProperties { ... @PropertyExpression("42") int name(); @PropertyExpression("http://localhost:8080") URL baseUrl(); @PropertyExpression("${myprops.baseUrl}/reports/index.html") URL reportIndexUrl(); }
Please note that you may use properties of any type to be used as placeholders in a property value, not just strings. By referencing property from a placeholder please be reminded to specify the fully qualified name of the property (which includes the name of the property set
.
Required Element Summary | |
---|---|
String |
value The expression to be evaluated to the property's value type. |
Element Detail |
---|
public abstract String value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |