com.dlsc.flexgantt.policy

## Class AbstractPolicy

- java.lang.Object
- - com.dlsc.flexgantt.policy.AbstractPolicy

- All Implemented Interfaces:
    IPolicy
  Direct Known Subclasses:
    AbstractGridPolicy, AbstractStatusBarPolicy, AbstractZoomPolicy, DefaultCrosshairPolicy, DefaultDragAndDropPolicy, DefaultDragInfoPolicy, DefaultEditActivityObjectPolicy, DefaultEditCapacityObjectPolicy, DefaultEditEventlineObjectPolicy, DefaultEditLayerPolicy, DefaultEditTimelineObjectPolicy, DefaultEventlineLabelPolicy, DefaultEventlineSelectionPolicy, DefaultGridLinePolicy, DefaultLabelPolicy, DefaultLinePolicy, DefaultNodeDragAndDropPolicy, DefaultNodeEditPolicy, DefaultOverviewPolicy, DefaultPopupPolicy, DefaultRelationshipPolicy, DefaultRowPolicy, DefaultSelectionPolicy, DefaultSpreadsheetEditPolicy

      public abstract class AbstractPolicy
      extends Object
      implements IPolicy

  All policies are subclasses of this abstract policy implementation.
  Since:
    1.0
  Version:
    $Revision: 1.6 $
  Author:
    Dirk Lemmermann
  See Also:
    `IPolicyProvider`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assertClass(String methodName, String argName, Class<?> cl, Object obj)` Utility method for detailed problem reporting when an object that gets passed to a policy method does not have the correct type.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractPolicy

          public AbstractPolicy()

  - ### Method Detail

    - #### assertClass

          public void assertClass(String methodName,
                                  String argName,
                                  Class<?> cl,
                                  Object obj)

      Utility method for detailed problem reporting when an object that gets passed to a policy method does not have the correct type. Policies intentionally do not use Generics as their usage would have increased the policy complexity too much.
      Parameters:
        `methodName` - the method that wants to assert / make sure that the given object does have the correct type
        `argName` - the name of the method argument that requires a certain object type
        `cl` - the required object type
        `obj` - the object that got passed to the method and that gets checked for whether it has the right type or not
      Since:
        1.0

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.