Interface DataType

All Known Implementing Classes:
PrimitiveDataType

@Contract public interface DataType
Denotes the type of the data a particular config element (attribute, element) should have. This interface should be implemented whenever a need arises to check if an abstract data type can be represented as a given String . The implementations of a DataType are mapped by their names elsewhere. Implementations should provide functional implementation of the #validate method and must have a public parameterless constructor (except possibly for primitives).
Since:
hk2 0.3.10
Author:
केदा&#2352 (km@dev.java.net)
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Checks if given value can be had by the abstract data type represented by this implementation.
  • Method Details

    • validate

      void validate(String value) throws ValidationException
      Checks if given value can be had by the abstract data type represented by this implementation.
      Parameters:
      value - String representing the value for this DataType
      Throws:
      ValidationException - if given String does not represent this data type.