public class DomDocument<T extends Dom>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<ActiveDescriptor<? extends ConfigInjector>,ConfigModel> |
models |
| Constructor and Description |
|---|
DomDocument(ServiceLocator habitat) |
| Modifier and Type | Method and Description |
|---|---|
ConfigModel |
buildModel(java.lang.Class<?> clazz)
Obtains a
ConfigModel for the given class (Which should have Configured annotation on it.) |
ConfigModel |
buildModel(java.lang.String fullyQualifiedClassName)
Obtains a
ConfigModel for the given class (Which should have Configured annotation on it.) |
java.util.List<ConfigModel> |
getAllModelsImplementing(java.lang.Class intf)
Calculates all @Configured interfaces subclassing the passed interface type.
|
ConfigModel |
getModel(java.lang.Class c)
Deprecated.
|
ConfigModel |
getModelByElementName(java.lang.String elementName)
Obtains the
ConfigModel from the "global" element name. |
Dom |
getRoot() |
Translator |
getTranslator() |
Dom |
make(ServiceLocator habitat,
javax.xml.stream.XMLStreamReader in,
T parent,
ConfigModel model) |
void |
setTranslator(Translator translator) |
void |
writeTo(javax.xml.stream.XMLStreamWriter w)
Writes back the whole DOM tree as an XML document.
|
protected final java.util.Map<ActiveDescriptor<? extends ConfigInjector>,ConfigModel> models
public DomDocument(ServiceLocator habitat)
public Dom getRoot()
public Translator getTranslator()
public void setTranslator(Translator translator)
public ConfigModel buildModel(java.lang.Class<?> clazz)
ConfigModel for the given class (Which should have Configured annotation on it.)public ConfigModel buildModel(java.lang.String fullyQualifiedClassName)
ConfigModel for the given class (Which should have Configured annotation on it.)public ConfigModel getModelByElementName(java.lang.String elementName)
ConfigModel from the "global" element name.
This method uses buildModel(org.glassfish.hk2.api.ActiveDescriptor<? extends org.jvnet.hk2.config.ConfigInjector>) to lazily build models if necessary.
public java.util.List<ConfigModel> getAllModelsImplementing(java.lang.Class intf) throws java.lang.ClassNotFoundException
intf - a @Configured interfacejava.lang.ClassNotFoundException@Deprecated public ConfigModel getModel(java.lang.Class c)
public Dom make(ServiceLocator habitat, javax.xml.stream.XMLStreamReader in, T parent, ConfigModel model)
public void writeTo(javax.xml.stream.XMLStreamWriter w)
throws javax.xml.stream.XMLStreamException
To support writing a subtree, this method doesn't invoke the start/endDocument events. Those are the responsibility of the caller.
w - Receives XML infoset stream.javax.xml.stream.XMLStreamExceptionCopyright © 2013 Oracle Corporation. All Rights Reserved.