public interface CdsAnnotatable
Modifier and Type | Method and Description |
---|---|
Stream<CdsAnnotation<?>> |
annotations()
|
static Predicate<CdsAnnotatable> |
byAnnotation(String annotation)
|
<T> Optional<CdsAnnotation<T>> |
findAnnotation(String name)
Returns an
Optional wrapping a CdsAnnotation . |
default <T> T |
getAnnotationValue(String name,
T defaultValue)
Returns the value of the
CdsAnnotation with the given name. |
Stream<CdsAnnotation<?>> annotations()
Stream
over the CdsAnnotation(s)
<T> Optional<CdsAnnotation<T>> findAnnotation(String name)
Optional
wrapping a CdsAnnotation
.T
- the expected type of the annotation valuename
- the name of the CdsAnnotation
Optional
describing the CdsAnnotation
with the
given name, or an empty Optional
if there is no
CdsAnnotation
with this namedefault <T> T getAnnotationValue(String name, T defaultValue)
CdsAnnotation
with the given name.T
- the type of the annotation valuename
- the name of the CdsAnnotation
defaultValue
- the value to be returned if there is no annotation
present, may be nulldefaultValue
if there is no
annotation with the given namestatic Predicate<CdsAnnotatable> byAnnotation(String annotation)
annotation
- the name of the CdsAnnotation
Predicate
filtering by annotationsCopyright © 2022 SAP. All rights reserved.