Package org.jvnet.hk2.config
Interface DataType
-
- All Known Implementing Classes:
NonNegativeInteger,Port,PositiveInteger,PrimitiveDataType
@Contract public interface DataTypeDenotes thetypeof 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 givenString. The implementations of a DataType are mapped by theirnameselsewhere. 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:
- केदार (km@dev.java.net)
- See Also:
PrimitiveDataType,WriteableView
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidvalidate(String value)Checks if given value can be had by the abstract data type represented by this implementation.
-
-
-
Method Detail
-
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.
-
-