Class MultiWrapDynaClass

java.lang.Object
org.apache.commons.configuration2.builder.combined.MultiWrapDynaClass
All Implemented Interfaces:
org.apache.commons.beanutils.DynaClass

class MultiWrapDynaClass extends Object implements org.apache.commons.beanutils.DynaClass

An implementation of DynaClass which combines the properties of multiple other DynaClass instances.

Since:
2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.apache.commons.beanutils.DynaProperty[]
    An empty array for converting the properties collection to an array.
    private final Map<String,org.apache.commons.beanutils.DynaProperty>
    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

    Constructors
    Constructor
    Description
    MultiWrapDynaClass(Collection<? extends org.apache.commons.beanutils.DynaClass> wrappedCls)
    Creates a new instance of MultiWrapDynaClass and initializes it with the collection of classes to be wrapped.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.commons.beanutils.DynaProperty[]
     
    org.apache.commons.beanutils.DynaProperty
     
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Collection<org.apache.commons.beanutils.DynaProperty> properties
      A collection with all properties of this class.
    • namedProperties

      private final Map<String,org.apache.commons.beanutils.DynaProperty> namedProperties
      A map for accessing properties by name.
  • Constructor Details

    • MultiWrapDynaClass

      public MultiWrapDynaClass(Collection<? extends org.apache.commons.beanutils.DynaClass> wrappedCls)
      Creates a new instance of MultiWrapDynaClass and initializes it with the collection of classes to be wrapped.
      Parameters:
      wrappedCls - the collection with wrapped classes
  • Method Details

    • getName

      public String getName()
      The name of this class is not relevant.
      Specified by:
      getName in interface org.apache.commons.beanutils.DynaClass
    • getDynaProperty

      public org.apache.commons.beanutils.DynaProperty getDynaProperty(String name)
      Specified by:
      getDynaProperty in interface org.apache.commons.beanutils.DynaClass
    • getDynaProperties

      public org.apache.commons.beanutils.DynaProperty[] getDynaProperties()
      Specified by:
      getDynaProperties in interface org.apache.commons.beanutils.DynaClass
    • newInstance

      public org.apache.commons.beanutils.DynaBean newInstance() throws IllegalAccessException, InstantiationException
      This implementation always throws an exception because it is not possible to instantiate a bean of multiple classes.
      Specified by:
      newInstance in interface org.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