Package com.enonic.xp.inputtype

## Class InputTypeBase

- java.lang.Object
- - com.enonic.xp.inputtype.InputTypeBase

- All Implemented Interfaces:
    `InputType`

      @PublicApi
      public abstract class InputTypeBase
      extends Object
      implements InputType

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `InputTypeBase​(InputTypeName name)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Value` | `createDefaultValue​(Input input)` |
    `abstract Value` | `createValue​(Value value, InputTypeConfig config)` |
    `Value` | `createValue​(String value, InputTypeConfig config)` |
    `InputTypeName` | `getName()` |
    `String` | `toString()` |
    `abstract void` | `validate​(Property property, InputTypeConfig config)` |
    `protected void` | `validateType​(Property property, ValueType expectedType)` |
    `protected void` | `validateType​(Property property, ValueType... expectedTypes)` |
    `protected void` | `validateValue​(Property property, boolean flag, String message)` |

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

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

- - ### Constructor Detail

    - #### InputTypeBase

          protected InputTypeBase​(InputTypeName name)

  - ### Method Detail

    - #### getName

          public final InputTypeName getName()

      Specified by:
        `getName` in interface `InputType`

    - #### toString

          public final String toString()

      Overrides:
        `toString` in class `Object`

    - #### createValue

          public Value createValue​(String value,
                                   InputTypeConfig config)

      Specified by:
        `createValue` in interface `InputType`

    - #### createValue

          public abstract Value createValue​(Value value,
                                            InputTypeConfig config)

      Specified by:
        `createValue` in interface `InputType`

    - #### createDefaultValue

          public Value createDefaultValue​(Input input)

      Specified by:
        `createDefaultValue` in interface `InputType`

    - #### validateType

          protected final void validateType​(Property property,
                                            ValueType expectedType)

    - #### validateType

          protected final void validateType​(Property property,
                                            ValueType... expectedTypes)

    - #### validateValue

          protected final void validateValue​(Property property,
                                             boolean flag,
                                             String message)

    - #### validate

          public abstract void validate​(Property property,
                                        InputTypeConfig config)

      Specified by:
        `validate` in interface `InputType`