Class DefaultParametersManager.DefaultHandlerData

java.lang.Object
org.apache.commons.configuration2.builder.DefaultParametersManager.DefaultHandlerData
Enclosing class:
DefaultParametersManager

private static final class DefaultParametersManager.DefaultHandlerData extends Object
A data class storing information about DefaultParametersHandler objects added to a Parameters object. Using this class it is possible to find out which default handlers apply for a given parameters object and to invoke them.
  • Field Details

    • handler

      private final DefaultParametersHandler<?> handler
      The handler object.
    • parameterClass

      private final Class<?> parameterClass
      The class supported by this handler.
    • startClass

      private final Class<?> startClass
      The start class for applying this handler.
  • Constructor Details

    • DefaultHandlerData

      public DefaultHandlerData(DefaultParametersHandler<?> h, Class<?> cls, Class<?> startCls)
      Creates a new instance of DefaultHandlerData.
      Parameters:
      h - the DefaultParametersHandler
      cls - the handler's data class
      startCls - the start class
  • Method Details

    • applyHandlerIfMatching

      public void applyHandlerIfMatching(BuilderParameters obj)
      Checks whether the managed DefaultParametersHandler can be applied to the given parameters object. If this is the case, it is executed on this object and can initialize it with default values.
      Parameters:
      obj - the parameters object to be initialized
    • isOccurrence

      public boolean isOccurrence(DefaultParametersHandler<?> h, Class<?> startCls)
      Tests whether this instance refers to the specified occurrence of a DefaultParametersHandler.
      Parameters:
      h - the handler to be checked
      startCls - the start class
      Returns:
      true if this instance refers to this occurrence, false otherwise