|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.hk2.config.ConfigModel
public final class ConfigModel
Describes the configuration model for a particular class (called "target type" in this class.) TODO: we need to remember if element values are single-valued or multi-valued.
| Nested Class Summary | |
|---|---|
static class |
ConfigModel.Node
|
static class |
ConfigModel.Property
|
| Field Summary | |
|---|---|
com.sun.hk2.component.Holder<java.lang.Class> |
classHolder
Deferred reference to the class object that can load the configurable type |
com.sun.hk2.component.Holder<java.lang.ClassLoader> |
classLoaderHolder
Deferred reference to the class loader that loaded the injector. |
org.jvnet.hk2.component.Inhabitant<? extends ConfigInjector> |
injector
Reference to the ConfigInjector used to inject values to
objects of this model. |
java.lang.String |
key
If this model has any property that works as a key. |
java.lang.String |
keyedAs
Fully-qualified name under which this type is indexed. |
java.lang.String |
targetTypeName
Fully-qualified name of the target type that this injector works on. |
| Constructor Summary | |
|---|---|
ConfigModel(DomDocument document,
org.jvnet.hk2.component.Inhabitant<? extends ConfigInjector> injector,
org.jvnet.hk2.component.MultiMap<java.lang.String,java.lang.String> description)
|
|
| Method Summary | ||
|---|---|---|
java.lang.String |
camelCaseToXML(java.lang.String camelCase)
|
|
ConfigModel.Property |
findIgnoreCase(java.lang.String xmlName)
Finds the ConfigModel.Property from either elements or attributes. |
|
java.util.Set<java.lang.String> |
getAttributeNames()
Returns the set of possible attributes names on this configuration model. |
|
java.lang.reflect.Method |
getDuckMethod(java.lang.reflect.Method method)
Obtains the duck method implementation from a method on the ConfigBeanProxy-derived interface. |
|
ConfigModel.Property |
getElement(java.lang.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(java.lang.String xmlName)
|
|
java.util.Set<java.lang.String> |
getElementNames()
Returns the list of all posible elements names on this model |
|
java.util.Set<java.lang.String> |
getLeafElementNames()
Returns the list of all the leaf attribute names on this model |
|
|
getProxyType()
Return the proxy type for this model |
|
java.lang.String |
getTagName()
getter for tagName |
|
ConfigModel.Property |
toProperty(java.lang.reflect.Method method)
Obtain XML names (like "abc-def") from strings like "getAbcDef" and "hasAbcDef". |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final org.jvnet.hk2.component.Inhabitant<? extends ConfigInjector> injector
ConfigInjector used to inject values to
objects of this model.
public final com.sun.hk2.component.Holder<java.lang.ClassLoader> classLoaderHolder
public final com.sun.hk2.component.Holder<java.lang.Class> classHolder
public final java.lang.String targetTypeName
public final java.lang.String keyedAs
Null if this type is not keyed.
public final java.lang.String key
ConfigMetadata.KEY| Constructor Detail |
|---|
public ConfigModel(DomDocument document,
org.jvnet.hk2.component.Inhabitant<? extends ConfigInjector> injector,
org.jvnet.hk2.component.MultiMap<java.lang.String,java.lang.String> description)
description - The description of the model as written in the inhabitants file.| Method Detail |
|---|
public java.lang.String getTagName()
public java.util.Set<java.lang.String> getAttributeNames()
public <T extends ConfigBeanProxy> java.lang.Class<T> getProxyType()
T - the proxy type
public java.util.Set<java.lang.String> getLeafElementNames()
public java.util.Set<java.lang.String> getElementNames()
public ConfigModel.Property getElement(java.lang.String elementName)
elementName - element name identifying the property
public ConfigModel.Property getElementFromXMlName(java.lang.String xmlName)
public java.lang.reflect.Method getDuckMethod(java.lang.reflect.Method method)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException
ConfigBeanProxy-derived interface.
java.lang.ClassNotFoundException
java.lang.NoSuchMethodExceptionpublic ConfigModel.Property toProperty(java.lang.reflect.Method method)
The conversion rule uses the model to find a good match.
public java.lang.String camelCaseToXML(java.lang.String camelCase)
public ConfigModel.Property findIgnoreCase(java.lang.String xmlName)
ConfigModel.Property from either elements or attributes.
xmlName - XML name to be searched.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||