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 voidaccept(CdsVisitor visitor) Accepts aCdsVisitorvisiting the elements of this definition (depth-first)Returns anOptionalwrapping the default value of thisCdsSimpleType.<T> TReturns the property for the given key.Class<?>Returns the Java type of thisCdsSimpleTypedefinition.default StringReturns the fully qualified name of this definition.getType()Returns theCdsBaseTypeof thisCdsSimpleTypedefinition.default booleanisSimple()Returnstrueif this is a simple type.default booleanisSimpleType(CdsBaseType baseType) Returnstrueif this is a simple type with a given base type.Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue, getDocMethods inherited from interface com.sap.cds.reflect.CdsDefinition
as, getKey, getKind, getName, getQualifierMethods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isAssociation, isEnum, isStructured, isSymbolicType
-
Method Details
-
getType
CdsBaseType getType()Returns theCdsBaseTypeof thisCdsSimpleTypedefinition.- Returns:
- the
CdsBaseTypeof this simple type definition, notnull
-
getJavaType
Class<?> getJavaType()Returns the Java type of thisCdsSimpleTypedefinition.- Returns:
- the Java type of this simple type definition, not
null
-
defaultValue
Returns anOptionalwrapping the default value of thisCdsSimpleType.- Returns:
- an
Optionaldescribing the default value of this simple type, or an emptyOptionalif 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
nullif there is no property with the given name
-
isSimple
default boolean isSimple()Description copied from interface:CdsTypeReturnstrueif this is a simple type. -
isSimpleType
Description copied from interface:CdsTypeReturnstrueif this is a simple type with a given base type.- Specified by:
isSimpleTypein interfaceCdsType- Parameters:
baseType- the base type- Returns:
trueif this is a simple type with a given base type, otherwisefalse
-
getQualifiedName
Description copied from interface:CdsDefinitionReturns the fully qualified name of this definition.- Specified by:
getQualifiedNamein interfaceCdsDefinition- Returns:
- the fully qualified name of this definition
-
accept
Description copied from interface:CdsDefinitionAccepts aCdsVisitorvisiting the elements of this definition (depth-first)- Specified by:
acceptin interfaceCdsDefinition- Parameters:
visitor- theCdsVisitor
-