Package org.jvnet.hk2.config
Class ConfigInjector<T>
java.lang.Object
org.jvnet.hk2.config.ConfigInjector<T>
- Direct Known Subclasses:
NoopConfigInjector
Inject configuration values to the object.
The service name indicates the element name in XML config.
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal intabstract voidReads values fromDomand inject them into the given target object.abstract voidinjectAttribute(Dom dom, String attributeName, T target) Injects a single property of the given attribute name.abstract voidinjectElement(Dom dom, String elementName, T target) Injects a single property of the given element name.final <T> TResolves a reference to the given type by the given id.
-
Constructor Details
-
ConfigInjector
public ConfigInjector()
-
-
Method Details
-
inject
Reads values fromDomand inject them into the given target object.- Throws:
ConfigurationException- If the injection fails. This exception won't have its location set yet. It's the caller's job to do so.
-
injectElement
Injects a single property of the given element name. -
injectAttribute
Injects a single property of the given attribute name. -
asInt
-
asBoolean
-
reference
Resolves a reference to the given type by the given id.
-