Class MultiWrapDynaClass
- java.lang.Object
-
- org.apache.commons.configuration2.builder.combined.MultiWrapDynaClass
-
- All Implemented Interfaces:
org.apache.commons.beanutils.DynaClass
final class MultiWrapDynaClass extends java.lang.Object implements org.apache.commons.beanutils.DynaClass
An implementation of
DynaClass
which combines the properties of multiple otherDynaClass
instances.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.commons.beanutils.DynaProperty[]
EMPTY_PROPS
An empty array for converting the properties collection to an array.private java.util.Map<java.lang.String,org.apache.commons.beanutils.DynaProperty>
namedProperties
A map for accessing properties by name.private java.util.Collection<org.apache.commons.beanutils.DynaProperty>
properties
A collection with all properties of this class.
-
Constructor Summary
Constructors Constructor Description MultiWrapDynaClass(java.util.Collection<? extends org.apache.commons.beanutils.DynaClass> wrappedCls)
Creates a new instance ofMultiWrapDynaClass
and initializes it with the collection of classes to be wrapped.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.beanutils.DynaProperty[]
getDynaProperties()
org.apache.commons.beanutils.DynaProperty
getDynaProperty(java.lang.String name)
java.lang.String
getName()
The name of this class is not relevant.private void
initProperties(java.util.Collection<? extends org.apache.commons.beanutils.DynaClass> wrappedCls)
Initializes the members related to the properties of the wrapped classes.org.apache.commons.beanutils.DynaBean
newInstance()
This implementation always throws an exception because it is not possible to instantiate a bean of multiple classes.
-
-
-
Field Detail
-
EMPTY_PROPS
private static final org.apache.commons.beanutils.DynaProperty[] EMPTY_PROPS
An empty array for converting the properties collection to an array.
-
properties
private final java.util.Collection<org.apache.commons.beanutils.DynaProperty> properties
A collection with all properties of this class.
-
namedProperties
private final java.util.Map<java.lang.String,org.apache.commons.beanutils.DynaProperty> namedProperties
A map for accessing properties by name.
-
-
Constructor Detail
-
MultiWrapDynaClass
public MultiWrapDynaClass(java.util.Collection<? extends org.apache.commons.beanutils.DynaClass> wrappedCls)
Creates a new instance ofMultiWrapDynaClass
and initializes it with the collection of classes to be wrapped.- Parameters:
wrappedCls
- the collection with wrapped classes
-
-
Method Detail
-
getDynaProperties
public org.apache.commons.beanutils.DynaProperty[] getDynaProperties()
- Specified by:
getDynaProperties
in interfaceorg.apache.commons.beanutils.DynaClass
-
getDynaProperty
public org.apache.commons.beanutils.DynaProperty getDynaProperty(java.lang.String name)
- Specified by:
getDynaProperty
in interfaceorg.apache.commons.beanutils.DynaClass
-
getName
public java.lang.String getName()
The name of this class is not relevant.- Specified by:
getName
in interfaceorg.apache.commons.beanutils.DynaClass
-
initProperties
private void initProperties(java.util.Collection<? extends org.apache.commons.beanutils.DynaClass> wrappedCls)
Initializes the members related to the properties of the wrapped classes.- Parameters:
wrappedCls
- the collection with the wrapped classes
-
newInstance
public org.apache.commons.beanutils.DynaBean newInstance() throws java.lang.IllegalAccessException, java.lang.InstantiationException
This implementation always throws an exception because it is not possible to instantiate a bean of multiple classes.- Specified by:
newInstance
in interfaceorg.apache.commons.beanutils.DynaClass
- Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException
-
-