Class DefaultParametersManager.DefaultHandlerData

  • Enclosing class:
    DefaultParametersManager

    private static final class DefaultParametersManager.DefaultHandlerData
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private DefaultParametersHandler<?> handler
      The handler object.
      private java.lang.Class<?> parameterClass
      The class supported by this handler.
      private java.lang.Class<?> startClass
      The start class for applying this handler.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultHandlerData​(DefaultParametersHandler<?> h, java.lang.Class<?> cls, java.lang.Class<?> startCls)
      Creates a new instance of DefaultHandlerData.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void applyHandlerIfMatching​(BuilderParameters obj)
      Checks whether the managed DefaultParametersHandler can be applied to the given parameters object.
      boolean isOccurrence​(DefaultParametersHandler<?> h, java.lang.Class<?> startCls)
      Tests whether this instance refers to the specified occurrence of a DefaultParametersHandler.
      • Methods inherited from class java.lang.Object

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

      • parameterClass

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

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

      • DefaultHandlerData

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

      • 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,
                                    java.lang.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