Package com.sap.cds.reflect
Interface CdsSimpleType
-
- All Superinterfaces:
CdsAnnotatable
,CdsDefinition
,CdsNamed
,CdsType
- All Known Subinterfaces:
CdsDecimal
,CdsEnumType<T>
,CdsStringType
public interface CdsSimpleType extends CdsType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
accept(CdsVisitor visitor)
Accepts aCdsVisitor
visiting the elements of this definition (depth-first)Optional<Object>
defaultValue()
Returns anOptional
wrapping the default value of thisCdsSimpleType
.<T> T
get(String property)
Returns the property for the given key.Class<?>
getJavaType()
Returns the Java type of thisCdsSimpleType
definition.default String
getQualifiedName()
Returns the fully qualified name of this definition.CdsBaseType
getType()
Returns theCdsBaseType
of thisCdsSimpleType
definition.default boolean
isSimple()
Returnstrue
if this is a simple type.-
Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue
-
Methods inherited from interface com.sap.cds.reflect.CdsDefinition
as, getKey, getKind, getName, getQualifier
-
Methods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isAssociation, isEnum, isSimpleType, isStructured
-
-
-
-
Method Detail
-
getType
CdsBaseType getType()
Returns theCdsBaseType
of thisCdsSimpleType
definition.- Returns:
- the
CdsBaseType
of this simple type definition, notnull
-
getJavaType
Class<?> getJavaType()
Returns the Java type of thisCdsSimpleType
definition.- Returns:
- the Java type of this simple type definition, not
null
-
defaultValue
Optional<Object> defaultValue()
Returns anOptional
wrapping the default value of thisCdsSimpleType
.- Returns:
- an
Optional
describing the default value of this simple type, or an emptyOptional
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
Returnstrue
if this is a simple type.
-
getQualifiedName
default String getQualifiedName()
Description copied from interface:CdsDefinition
Returns the fully qualified name of this definition.- Specified by:
getQualifiedName
in interfaceCdsDefinition
- Returns:
- the fully qualified name of this definition
-
accept
default void accept(CdsVisitor visitor)
Description copied from interface:CdsDefinition
Accepts aCdsVisitor
visiting the elements of this definition (depth-first)- Specified by:
accept
in interfaceCdsDefinition
- Parameters:
visitor
- theCdsVisitor
-
-