public class DomDocument<T extends Dom> extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<org.glassfish.hk2.api.ActiveDescriptor<? extends ConfigInjector>,ConfigModel> |
models |
Constructor and Description |
---|
DomDocument(org.glassfish.hk2.api.ServiceLocator habitat) |
Modifier and Type | Method and Description |
---|---|
ConfigModel |
buildModel(Class<?> clazz)
Obtains a
ConfigModel for the given class (Which should have Configured annotation on it.) |
ConfigModel |
buildModel(String fullyQualifiedClassName)
Obtains a
ConfigModel for the given class (Which should have Configured annotation on it.) |
List<ConfigModel> |
getAllModelsImplementing(Class intf)
Calculates all @Configured interfaces subclassing the passed interface type.
|
ConfigModel |
getModel(Class c)
Deprecated.
|
ConfigModel |
getModelByElementName(String elementName)
Obtains the
ConfigModel from the "global" element name. |
Dom |
getRoot() |
Translator |
getTranslator() |
Dom |
make(org.glassfish.hk2.api.ServiceLocator habitat,
XMLStreamReader in,
T parent,
ConfigModel model) |
void |
setTranslator(Translator translator) |
void |
writeTo(XMLStreamWriter w)
Writes back the whole DOM tree as an XML document.
|
protected final Map<org.glassfish.hk2.api.ActiveDescriptor<? extends ConfigInjector>,ConfigModel> models
public Dom getRoot()
public Translator getTranslator()
public void setTranslator(Translator translator)
public ConfigModel buildModel(Class<?> clazz)
ConfigModel
for the given class (Which should have Configured
annotation on it.)public ConfigModel buildModel(String fullyQualifiedClassName)
ConfigModel
for the given class (Which should have Configured
annotation on it.)public ConfigModel getModelByElementName(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 List<ConfigModel> getAllModelsImplementing(Class intf) throws ClassNotFoundException
intf
- a @Configured interfaceClassNotFoundException
@Deprecated public ConfigModel getModel(Class c)
public Dom make(org.glassfish.hk2.api.ServiceLocator habitat, XMLStreamReader in, T parent, ConfigModel model)
public void writeTo(XMLStreamWriter w) throws 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.XMLStreamException
Copyright © 2021. All rights reserved.