public class PropertiesLookup extends Lookup
| Constructor and Description |
|---|
PropertiesLookup(InputStream istr) |
PropertiesLookup(Properties properties) |
PropertiesLookup(String resourceName) |
PropertiesLookup(String name,
InputStream istr) |
PropertiesLookup(String name,
Properties properties) |
PropertiesLookup(String name,
String resourceName) |
| Modifier and Type | Method and Description |
|---|---|
String |
nameFromFragments(List<String> fragments)
Assemble an attribute name that conforms to this Lookup's naming scheme from the provided list of name fragments.
|
String |
valueFromName(String name,
Class singletonType)
Perform the actual lookup characteristic of this Lookup.
|
capitalize, getNamepublic PropertiesLookup(String resourceName)
public PropertiesLookup(InputStream istr)
public PropertiesLookup(Properties properties)
public PropertiesLookup(String name, InputStream istr)
public PropertiesLookup(String name, Properties properties)
public String nameFromFragments(List<String> fragments)
LookupnameFromFragments in class Lookupfragments - This will be the camel-cased name of the method from your configuration interface, broken apart
into fragments. For example, "threadPoolSize" will become {"thread", "Pool", "Size"} and
"weatherServiceBaseURL" will become {"weather", "Service", "Base", "URL"}.public String valueFromName(String name, Class singletonType)
LookupvalueFromName in class Lookupname - The name of the value to look up, in this Lookup's naming scheme. For example, if the configuration
interface's method name is "threadPoolSize" and nameFromFragments converts that to "thread.pool.size,"
then this method will receive "thread.pool.size" as the name to look up.singletonType - This is the configuration interface that's being satisfied. Mostly you'll ignore this
parameter, but you might find it useful for composing error messages or logging.Copyright © 2017. All rights reserved.