Package com.sap.cds.reflect
Interface CdsEnumType<T>
-
- All Superinterfaces:
CdsAnnotatable
,CdsDefinition
,CdsNamed
,CdsSimpleType
,CdsType
public interface CdsEnumType<T> extends CdsSimpleType
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CdsEnumType.Enumeral<T>
-
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)Map<String,CdsEnumType.Enumeral<T>>
enumerals()
Returns the enumerals of thisCdsEnumType
as a map, which maps the name of the enumeral to the enumeral.default boolean
hasValue(Object value)
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
-
Methods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isAssociation, isSimpleType, isStructured
-
-
-
-
Method Detail
-
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:
CdsEnumType.Enumeral
-
hasValue
default boolean hasValue(Object value)
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
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
- Specified by:
accept
in interfaceCdsSimpleType
- Parameters:
visitor
- theCdsVisitor
-
-