Interface CdsSimpleType

All Superinterfaces:
CdsAnnotatable, CdsDefinition, CdsNamed, CdsType
All Known Subinterfaces:
CdsDecimal, CdsEnumType<T>, CdsStringType

public interface CdsSimpleType extends CdsType
  • Method Details

    • getType

      CdsBaseType getType()
      Returns the CdsBaseType of this CdsSimpleType definition.
      Returns:
      the CdsBaseType of this simple type definition, not null
    • getJavaType

      Class<?> getJavaType()
      Returns the Java type of this CdsSimpleType definition.
      Returns:
      the Java type of this simple type definition, not null
    • defaultValue

      Optional<Object> defaultValue()
      Returns an Optional wrapping the default value of this CdsSimpleType.
      Returns:
      an Optional describing the default value of this simple type, or an empty Optional if there is no default value
    • get

      <T> T get(String property)
      Returns the property for the given key.
      Type Parameters:
      T - the expected type of the property
      Parameters:
      property - the name of the property
      Returns:
      the value of the property or null if there is no property with the given name
    • isSimple

      default boolean isSimple()
      Description copied from interface: CdsType
      Returns true if this is a simple type.
      Specified by:
      isSimple in interface CdsType
      Returns:
      true if this is a simple type, otherwise false
    • isSimpleType

      default boolean isSimpleType(CdsBaseType baseType)
      Description copied from interface: CdsType
      Returns true if this is a simple type with a given base type.
      Specified by:
      isSimpleType in interface CdsType
      Parameters:
      baseType - the base type
      Returns:
      true if this is a simple type with a given base type, otherwise false
    • getQualifiedName

      default String getQualifiedName()
      Description copied from interface: CdsDefinition
      Returns the fully qualified name of this definition.
      Specified by:
      getQualifiedName in interface CdsDefinition
      Returns:
      the fully qualified name of this definition
    • accept

      default void accept(CdsVisitor visitor)
      Description copied from interface: CdsDefinition
      Accepts a CdsVisitor visiting the elements of this definition (depth-first)
      Specified by:
      accept in interface CdsDefinition
      Parameters:
      visitor - the CdsVisitor