public final class ConfigModel extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ConfigModel.Node |
static class |
ConfigModel.Property |
Modifier and Type | Field and Description |
---|---|
HK2Loader |
classLoaderHolder
Deferred reference to the class loader that loaded the injector.
|
ActiveDescriptor<? extends ConfigInjector> |
injector
Reference to the
ConfigInjector used to inject values to
objects of this model. |
String |
key
If this model has any property that works as a key.
|
String |
keyedAs
Fully-qualified name under which this type is indexed.
|
String |
targetTypeName
Fully-qualified name of the target type that this injector works on.
|
Constructor and Description |
---|
ConfigModel(DomDocument document,
ActiveDescriptor<? extends ConfigInjector> injector,
Map<String,List<String>> description,
ServiceLocator locator) |
Modifier and Type | Method and Description |
---|---|
static String |
camelCaseToXML(String camelCase) |
ConfigModel.Property |
findIgnoreCase(String xmlName)
|
Set<String> |
getAttributeNames()
Returns the set of possible attributes names on this configuration model.
|
Method |
getDuckMethod(Method method)
Obtains the duck method implementation from a method on the
ConfigBeanProxy -derived interface. |
ConfigModel.Property |
getElement(String elementName)
Returns the Property model for an element associated with this model
or null of the element name is not known,
|
ConfigModel.Property |
getElementFromXMlName(String xmlName) |
Set<String> |
getElementNames()
Returns the list of all posible elements names on this model
|
Set<String> |
getLeafElementNames()
Returns the list of all the leaf attribute names on this model
|
Map<String,List<String>> |
getMetadata() |
<T extends ConfigBeanProxy> |
getProxyType()
Return the proxy type for this model
|
String |
getTagName()
getter for tagName
|
ConfigModel.Property |
toProperty(Method method)
Obtain XML names (like "abc-def") from strings like "getAbcDef" and "hasAbcDef".
|
static String |
trimPrefix(String name) |
public final ActiveDescriptor<? extends ConfigInjector> injector
ConfigInjector
used to inject values to
objects of this model.public final HK2Loader classLoaderHolder
public final String targetTypeName
public final String keyedAs
Null if this type is not keyed.
public final String key
ConfigMetadata.KEY
public ConfigModel(DomDocument document, ActiveDescriptor<? extends ConfigInjector> injector, Map<String,List<String>> description, ServiceLocator locator)
description
- The description of the model as written in the inhabitants file
.public String getTagName()
public Set<String> getAttributeNames()
public <T extends ConfigBeanProxy> Class<T> getProxyType()
T
- the proxy typepublic Set<String> getLeafElementNames()
public Set<String> getElementNames()
public ConfigModel.Property getElement(String elementName)
elementName
- element name identifying the propertypublic ConfigModel.Property getElementFromXMlName(String xmlName)
public Method getDuckMethod(Method method) throws ClassNotFoundException, NoSuchMethodException
ConfigBeanProxy
-derived interface.public ConfigModel.Property toProperty(Method method)
The conversion rule uses the model to find a good match.
public ConfigModel.Property findIgnoreCase(String xmlName)
xmlName
- XML name to be searched.Copyright © 2009–2016 Oracle Corporation. All rights reserved.