@Target(value=TYPE) @Retention(value=RUNTIME) public @interface ConfigurationEntries
The primary purpose of this annotation is a factoring of
common configuration entry name prefix to a single place. If
the prefix attribute is an empty string, no prefix will
be used. If the prefix is set to CLASS_NAME_PREFIX,
the simple class name (without packages) will be used as a prefix.
Example: Given the following interface
@ConfigurationEntries( prefix = "org.example" )
public interface TestInterface {
String textValue();
int numericValue();
@ConfigurationEntryName( name = "system.enabled" )
boolean enabled();
}
the retrieved configuration entries will be:
| Access method | Configuration entry |
|---|---|
textValue() | org.example.textValue |
numericValue() | org.example.numericValue |
enabled() | org.example.system.enabled |
| Modifier and Type | Fields and Description |
|---|---|
static String |
CLASS_NAME_PREFIX |
Copyright © 2015 Boleslav Bobcik - Auderis. All rights reserved.