Package com.sap.cds.reflect
Interface CdsElement
-
- All Superinterfaces:
CdsAnnotatable
,CdsNamed
public interface CdsElement extends CdsAnnotatable, CdsNamed
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
accept(CdsVisitor visitor)
Accepts aCdsVisitor
visiting this type.Optional<Object>
defaultValue()
Returns anOptional
wrapping the default value of this element.<T extends CdsDefinition>
TgetDeclaringType()
Returns the declaring type of thisCdsElement
.default String
getKey()
Returns the name that uniquely identifies this named objectString
getName()
Returns the name of thisCdsElement
.default String
getQualifiedName()
Returns the fully qualified name of this element.<T extends CdsType>
TgetType()
Returns the type of thisCdsElement
.boolean
isKey()
Returnstrue
if thisCdsElement
is a key.boolean
isLocalized()
Returnstrue
if thisCdsElement
is localized.boolean
isNotNull()
Returnstrue
if thisCdsElement
cannot benull
.boolean
isUnique()
Returnstrue
if thisCdsElement
is unique.boolean
isVirtual()
Returnstrue
if thisCdsElement
is virtual.-
Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue
-
-
-
-
Method Detail
-
getName
String getName()
Returns the name of thisCdsElement
.- Returns:
- the namespace of this element, not
null
-
getQualifiedName
default String getQualifiedName()
Returns the fully qualified name of this element.- Returns:
- the fully qualified name
-
getType
<T extends CdsType> T getType()
Returns the type of thisCdsElement
.- Type Parameters:
T
- theCdsType
of this element- Returns:
- the type of this element, not
null
-
getDeclaringType
<T extends CdsDefinition> T getDeclaringType()
Returns the declaring type of thisCdsElement
.- Type Parameters:
T
- the type of the declaring type- Returns:
- the declaring type of this element, not
null
-
isKey
boolean isKey()
Returnstrue
if thisCdsElement
is a key.- Returns:
true
if this element is a key, otherwisefalse
-
isVirtual
boolean isVirtual()
Returnstrue
if thisCdsElement
is virtual.- Returns:
true
if this is a virtual element, otherwisefalse
-
isUnique
boolean isUnique()
Returnstrue
if thisCdsElement
is unique.- Returns:
true
if this is a unique element, otherwisefalse
-
isNotNull
boolean isNotNull()
Returnstrue
if thisCdsElement
cannot benull
.- Returns:
true
if this element cannot benull
, otherwisefalse
-
isLocalized
boolean isLocalized()
Returnstrue
if thisCdsElement
is localized.- Returns:
true
if this element is localized, otherwisefalse
-
defaultValue
Optional<Object> defaultValue()
Returns anOptional
wrapping the default value of this element.- Returns:
- an
Optional
describing the default value of this element, or an emptyOptional
if there is no default value
-
accept
default void accept(CdsVisitor visitor)
Accepts aCdsVisitor
visiting this type.- Parameters:
visitor
- theCdsVisitor
-
-