Package com.sap.cds.reflect
Interface CdsDefinition
- All Superinterfaces:
CdsAnnotatable,CdsNamed
- All Known Subinterfaces:
CdsAction,CdsArrayedType,CdsAssociationType,CdsBoundAction,CdsBoundFunction,CdsDecimal,CdsEntity,CdsEnumType<T>,CdsEvent,CdsFunction,CdsOperation,CdsService,CdsSimpleType,CdsStringType,CdsStructuredType,CdsType
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(CdsVisitor visitor) Accepts aCdsVisitorvisiting the elements of this definition (depth-first)default <T extends CdsDefinition>
TCasts this type to the givenCdsDefinition.static Predicate<CdsDefinition>byNamespace(String namespace) Returns aPredicateto filterCdsDefinition(s)that are inside the given namespace.default StringgetKey()Returns the name that uniquely identifies this named objectgetKind()Returns the kind of this definition.getName()Returns the unqualified name of this definition.Returns the fully qualified name of this definition.Returns the qualifier part of this definition's qualified name.Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue, getDoc
-
Method Details
-
accept
Accepts aCdsVisitorvisiting the elements of this definition (depth-first)- Parameters:
visitor- theCdsVisitor
-
getQualifiedName
String getQualifiedName()Returns the fully qualified name of this definition.- Returns:
- the fully qualified name of this definition
-
getName
String getName()Returns the unqualified name of this definition.- Returns:
- the unqualified name
-
getQualifier
String getQualifier()Returns the qualifier part of this definition's qualified name.- Returns:
- the qualifier of the qualified name, or an empty string if this definition does not have a qualifier
-
getKind
CdsKind getKind()Returns the kind of this definition.- Returns:
- the kind of this definition
-
byNamespace
Returns aPredicateto filterCdsDefinition(s)that are inside the given namespace. If the namespace is empty ornull, all definitions match.- Parameters:
namespace- the namespace to filter, can be empty ornull- Returns:
- a
Predicatefiltering by namespace
-
as
Casts this type to the givenCdsDefinition.- Type Parameters:
T- the return type- Parameters:
type- the subtype ofCdsDefinitionto cast to- Returns:
- this type casted to the given
CdsDefinitionclass
-
getKey
Description copied from interface:CdsNamedReturns the name that uniquely identifies this named object
-