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