Package com.sap.cds.reflect
Interface CdsEnumType<T>
- All Superinterfaces:
CdsAnnotatable,CdsDefinition,CdsNamed,CdsSimpleType,CdsType
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaccept(CdsVisitor visitor) Accepts aCdsVisitorvisiting the elements of this definition (depth-first)Returns the enumerals of thisCdsEnumTypeas a map, which maps the name of the enumeral to the enumeral.default booleanTests if this enum type has an enumeral with a given value.default booleanisEnum()Returnstrueif this is an enum 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.CdsSimpleType
defaultValue, get, getJavaType, getQualifiedName, getType, isSimple, isSimpleTypeMethods 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 thisCdsEnumTypeas 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:
trueif this enum type has an enumeral with a given value,falseotherwise
-
isEnum
default boolean isEnum()Description copied from interface:CdsTypeReturnstrueif this is an enum type. -
accept
Description copied from interface:CdsDefinitionAccepts aCdsVisitorvisiting the elements of this definition (depth-first)- Specified by:
acceptin interfaceCdsDefinition- Specified by:
acceptin interfaceCdsSimpleType- Parameters:
visitor- theCdsVisitor
-