|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.hk2.config.ConfigInjector<T>
@Contract public abstract class ConfigInjector<T>
Inject configuration values to the object. The service name indicates the element name in XML config.
| Constructor Summary | |
|---|---|
ConfigInjector()
|
|
| Method Summary | ||
|---|---|---|
boolean |
asBoolean(String v)
|
|
int |
asInt(String v)
|
|
abstract void |
inject(Dom dom,
T target)
Reads values from Dom and inject them into the given target object. |
|
abstract void |
injectAttribute(Dom dom,
String attributeName,
T target)
Injects a single property of the given attribute name. |
|
abstract void |
injectElement(Dom dom,
String elementName,
T target)
Injects a single property of the given element name. |
|
|
reference(Dom dom,
String id,
Class<T> type)
Resolves a reference to the given type by the given id. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigInjector()
| Method Detail |
|---|
public abstract void inject(Dom dom,
T target)
Dom and inject them into the given target object.
ConfigurationException - If the injection fails. This exception won't have its location set yet.
It's the caller's job to do so.
public abstract void injectElement(Dom dom,
String elementName,
T target)
public abstract void injectAttribute(Dom dom,
String attributeName,
T target)
public final int asInt(String v)
public final boolean asBoolean(String v)
public final <T> T reference(Dom dom,
String id,
Class<T> type)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||