Package com.sap.cds.reflect
Interface CdsStructuredType
- All Superinterfaces:
CdsAnnotatable,CdsDefinition,CdsNamed,CdsType
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaccept(CdsVisitor visitor) Accepts aCdsVisitorvisiting the elements of this definition (depth-first)default Stream<CdsElement>Returns a sequentialStreamover theCdsElement(s)of typeCdsAssociationTypein this structured type.default Stream<CdsElement>Returns a sequentialStreamover theCdsElement(s)of type composition in this structured type.default Stream<CdsElement>Returns a sequentialStreamover the non virtualCdsElement(s)in this structured type.default Stream<CdsElement>Returns a sequentialStreamover theCdsElement(s)in this structured type that are not of typeCdsAssociationTypeand not virtual.elements()Returns a sequentialStreamover allCdsElement(s)in this structured type.default <T extends CdsType>
Stream<CdsElement>elementsOfType(Class<T> type) findAssociation(String name) findElement(String name) Returns anOptionalwrapping aCdsElement.getAssociation(String name) Get aCdsElementof typeCdsAssociationTypeby name.getElement(String name) Get aCdsElementby name.<S extends CdsStructuredType>
SgetTargetOf(String path) Returns the targetCdsStructuredTypeof the given navigation path.default booleanReturnstrueif this is an inline defined structured type without a name.default booleanReturnstrueif this is a structured type.default Stream<CdsElement>Returns a sequentialStreamover the keyCdsElement(s)in this structured type.default Stream<CdsElement>Returns a sequentialStreamover theCdsElement(s)in this structured type that are not of typeCdsAssociationType.default Stream<CdsElement>Returns a sequentialStreamover the virtualCdsElement(s)in this structured 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, getQualifiedName, getQualifierMethods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isAssociation, isEnum, isSimple, isSimpleType, isSymbolicType
-
Method Details
-
getElement
Get aCdsElementby name.- Parameters:
name- the name of theCdsElement- Returns:
- the
CdsElementwith the given name - Throws:
CdsElementNotFoundException- if there is noCdsElementwith the given name
-
findElement
Returns anOptionalwrapping aCdsElement.- Parameters:
name- the name of theCdsElement- Returns:
- an
Optionaldescribing theCdsElementwith the given name, or an emptyOptionalif there is noCdsElementwith this name
-
getAssociation
Get aCdsElementof typeCdsAssociationTypeby name.- Parameters:
name- the name of theCdsElement- Returns:
- the
CdsElementof typeCdsAssociationwith the given name - Throws:
CdsElementNotFoundException- if there is noCdsElementwith the given name
-
findAssociation
- Parameters:
name- the name of theCdsElement- Returns:
- an
Optionaldescribing theCdsElementof typeCdsAssociationwith the given name, or an emptyOptionalif there is noCdsElementwith this name
-
getTargetOf
Returns the targetCdsStructuredTypeof the given navigation path.- Parameters:
path- the navigation path- Returns:
- the target
CdsStructuredTypeof the path - Throws:
CdsReflectiveOperationException- if the path is invalid
-
elements
Stream<CdsElement> elements()Returns a sequentialStreamover allCdsElement(s)in this structured type.- Returns:
- a sequential
Streamover theCdsElement(s)
-
keyElements
Returns a sequentialStreamover the keyCdsElement(s)in this structured type.- Returns:
- a sequential
Streamover the keyCdsElement(s)
-
virtualElements
Returns a sequentialStreamover the virtualCdsElement(s)in this structured type.- Returns:
- a sequential
Streamover the virtualCdsElement(s)
-
concreteElements
Returns a sequentialStreamover the non virtualCdsElement(s)in this structured type.- Returns:
- a sequential
Streamover the non virtualCdsElement(s)
-
nonAssociationElements
Returns a sequentialStreamover theCdsElement(s)in this structured type that are not of typeCdsAssociationType.- Returns:
- a sequential
Streamover theCdsElement(s)that are not of typeCdsAssociation
-
concreteNonAssociationElements
Returns a sequentialStreamover theCdsElement(s)in this structured type that are not of typeCdsAssociationTypeand not virtual.- Returns:
- a sequential
Streamover theCdsElement(s)that are not of typeCdsAssociation
-
associations
Returns a sequentialStreamover theCdsElement(s)of typeCdsAssociationTypein this structured type.- Returns:
- a sequential
Streamover theCdsElement(s)of typeCdsAssociation
-
compositions
Returns a sequentialStreamover theCdsElement(s)of type composition in this structured type.- Returns:
- a sequential
Streamover theCdsElement(s)of type composition
-
elementsOfType
- Type Parameters:
T- the type of theCdsElement(s)- Parameters:
type- the type class of theCdsElement(s)- Returns:
- a sequential
Streamover theCdsElement(s)of the given type<T>
-
isAnonymous
default boolean isAnonymous()Returnstrueif this is an inline defined structured type without a name.- Returns:
trueif this is a structured type without name, otherwisefalse
-
isStructured
default boolean isStructured()Description copied from interface:CdsTypeReturnstrueif this is a structured type.- Specified by:
isStructuredin interfaceCdsType- Returns:
trueif this is a structured type, otherwisefalse
-
accept
Description copied from interface:CdsDefinitionAccepts aCdsVisitorvisiting the elements of this definition (depth-first)- Specified by:
acceptin interfaceCdsDefinition- Parameters:
visitor- theCdsVisitor
-