All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ceylon.language.meta.optionalAnnotation.ceylon Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
import ceylon.language.meta.model { Class }
// Do we really need this? Isn't annotations sufficient?
"The value of given optional annotation type on the given program element, 
 or null if the program element was not annotated with that annotation type.
 For example:
 
     // Does the process declaration have the Shared annotation?
     value isShared = optionalAnnotation(`SharedAnnotation`, `value process`) exists;
 "
shared Value? optionalAnnotation(
            Class> annotationType,
            ProgramElement programElement)
        given Value satisfies OptionalAnnotation
        given ProgramElement satisfies Annotated { 
    return annotations(annotationType, programElement);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy