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 TypeMethodDescriptionvoid
accept
(CdsVisitor visitor) Accepts aCdsVisitor
visiting the elements of this definition (depth-first)default <T extends CdsDefinition>
TCasts this type to the givenCdsDefinition
.static Predicate<CdsDefinition>
byNamespace
(String namespace) Returns aPredicate
to filterCdsDefinition(s)
that are inside the given namespace.default String
getKey()
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 aCdsVisitor
visiting 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 aPredicate
to 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
Predicate
filtering by namespace
-
as
Casts this type to the givenCdsDefinition
.- Type Parameters:
T
- the return type- Parameters:
type
- the subtype ofCdsDefinition
to cast to- Returns:
- this type casted to the given
CdsDefinition
class
-
getKey
Description copied from interface:CdsNamed
Returns the name that uniquely identifies this named object
-