Class AbstractTypeAdapter

java.lang.Object
ch.tocco.nice2.types.api.AbstractTypeAdapter
All Implemented Interfaces:
TypeReceivable
Direct Known Subclasses:
IntegerValidatorTypeAdapter, PasswordValidatorTypeAdapter, StringValidatorTypeAdapter, TextValidatorTypeAdapter

public abstract class AbstractTypeAdapter extends Object implements TypeReceivable
Generic abstract base class that may be used by type adapter contribution implementations.

This base class provides a reference to the type for which it was instantiated. This can come in handy for example when using the same adapter for multiple types.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Type
    It may come in useful because this same Adapter type can be configured for multiple types.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setType(Type type)
    Called by the TypeManager when creating a TypeAdapter in setAdaptersConfig().

    Methods inherited from class java.lang.Object

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

    • type

      protected Type type
      It may come in useful because this same Adapter type can be configured for multiple types.
  • Constructor Details

    • AbstractTypeAdapter

      public AbstractTypeAdapter()
  • Method Details

    • setType

      public void setType(Type type)
      Description copied from interface: TypeReceivable
      Called by the TypeManager when creating a TypeAdapter in setAdaptersConfig().
      Specified by:
      setType in interface TypeReceivable
      Parameters:
      type - The type for which this Adapter is configured.