Interface Datatype

All Superinterfaces:
Comparable<Datatype>
All Known Subinterfaces:
EnumDatatype, NamedDatatype, NumericDatatype, ValueDatatype
All Known Implementing Classes:
AbstractDatatype, AbstractPrimitiveDatatype, AnyDatatype, ArrayOfValueDatatype, BigDecimalDatatype, BooleanDatatype, CurrencyDatatype, DateDatatype, DecimalDatatype, DefaultGenericEnumDatatype, DefaultGenericValueDatatype, DoubleDatatype, GenericEnumDatatype, GenericValueDatatype, GregorianCalendarAsDateDatatype, GregorianCalendarDatatype, IntegerDatatype, InternationalStringDatatype, JavaClass2DatatypeAdaptor, ListOfTypeDatatype, LocalDateDatatype, LocalDateTimeDatatype, LocalTimeDatatype, LongDatatype, MoneyDatatype, MonthDayDatatype, PrimitiveBooleanDatatype, PrimitiveIntegerDatatype, PrimitiveLongDatatype, StringDatatype, ValueClassDatatype, ValueClassNameDatatype, Void

public interface Datatype extends Comparable<Datatype>
The type of data similar to a Java class. In most cases a datatype corresponds directly to a Java class, e.g. a datatype that represents text data (String) corresponds to the class java.lang.String. However a datatype can exist while the corresponding Java class does not exist (yet, because it's being generated at a later point in time).

If the datatype represents a value, you can safely cast the datatype to ValueDatatype. The value datatype provides a uniform way to transform values into Strings and parse Strings back into values.

Author:
Jan Ortmann
  • Field Details

  • Method Details

    • getName

      String getName()
      Returns the datatype's name.
    • getQualifiedName

      String getQualifiedName()
      Returns the datatype's qualified name.

      The qualified name identifies the datatype.

    • isVoid

      boolean isVoid()
      Returns true if this is the Datatype Void, otherwise false.
    • isPrimitive

      boolean isPrimitive()
      Returns true if this datatype represents one of Java's primitive types.
    • isAbstract

      boolean isAbstract()
      Returns true if this datatype is an abstract datatype in means of the object oriented paradigm.
    • isValueDatatype

      boolean isValueDatatype()
      Returns true if this datatype represents values.

      If the method returns true, the datatype can be safely casted to ValueDatatype.

    • isEnum

      boolean isEnum()
      Returns true if this value datatype is an enum datatype. In this case the instance can be cast to EnumDatatype. Returns false otherwise.
    • hasNullObject

      boolean hasNullObject()
      Returns true if the datatype has a special instance representing null, otherwise false. The design pattern is called the null-object pattern.
      See Also:
      • NullObject