Package com.sap.cds.reflect
Interface CdsEnumType<T>
- All Superinterfaces:
CdsAnnotatable
,CdsDefinition
,CdsNamed
,CdsSimpleType
,CdsType
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(CdsVisitor visitor) Accepts aCdsVisitor
visiting the elements of this definition (depth-first)Returns the enumerals of thisCdsEnumType
as a map, which maps the name of the enumeral to the enumeral.default boolean
Tests if this enum type has an enumeral with a given value.default boolean
isEnum()
Returnstrue
if this is an enum 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.CdsSimpleType
defaultValue, get, getJavaType, getQualifiedName, getType, isSimple, isSimpleType
Methods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isAssociation, isStructured, isSymbolicType
-
Method Details
-
enumerals
Map<String,CdsEnumType.Enumeral<T>> enumerals()Returns the enumerals of thisCdsEnumType
as a map, which maps the name of the enumeral to the enumeral.- Returns:
- the enumerals of this enum type, not
null
- See Also:
-
hasValue
Tests if this enum type has an enumeral with a given value.- Parameters:
value
- the value to test for- Returns:
true
if this enum type has an enumeral with a given value,false
otherwise
-
isEnum
default boolean isEnum()Description copied from interface:CdsType
Returnstrue
if this is an enum type. -
accept
Description copied from interface:CdsDefinition
Accepts aCdsVisitor
visiting the elements of this definition (depth-first)- Specified by:
accept
in interfaceCdsDefinition
- Specified by:
accept
in interfaceCdsSimpleType
- Parameters:
visitor
- theCdsVisitor
-