Package com.sap.cds.reflect
Interface CdsSimpleType
- All Superinterfaces:
CdsAnnotatable
,CdsDefinition
,CdsNamed
,CdsType
- All Known Subinterfaces:
CdsDecimal
,CdsEnumType<T>
,CdsStringType
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(CdsVisitor visitor) Accepts aCdsVisitor
visiting the elements of this definition (depth-first)Returns anOptional
wrapping the default value of thisCdsSimpleType
.<T> T
Returns the property for the given key.Class<?>
Returns the Java type of thisCdsSimpleType
definition.default String
Returns the fully qualified name of this definition.getType()
Returns theCdsBaseType
of thisCdsSimpleType
definition.default boolean
isSimple()
Returnstrue
if this is a simple type.default boolean
isSimpleType
(CdsBaseType baseType) Returnstrue
if this is a simple type with a given base 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, isStructured, isSymbolicType
-
Method Details
-
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
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
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. -
isSimpleType
Description copied from interface:CdsType
Returnstrue
if this is a simple type with a given base type.- Specified by:
isSimpleType
in interfaceCdsType
- Parameters:
baseType
- the base type- Returns:
true
if this is a simple type with a given base type, otherwisefalse
-
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
Description copied from interface:CdsDefinition
Accepts aCdsVisitor
visiting the elements of this definition (depth-first)- Specified by:
accept
in interfaceCdsDefinition
- Parameters:
visitor
- theCdsVisitor
-