Commit eaa578de authored by Alexander Diewald's avatar Alexander Diewald

Annotations: Add a Utility Method for Defining Values

Issue-Ref: 4008
Issue-Url: Alexander Diewald's avatarAlexander Diewald <>
parent bf8efe9e 462551eae71738ff51f92c9906bff9a21a375d2b GREEN d97bf564f04487c2628a4ab03f93726bc2de8678 GREEN ea90ec75a20df3a616f21611f1b0bce165795cfe YELLOW 65f6c39b641cba3c984a38f42b1bbf7dbf3287a3 GREEN b8775b7a462efc168cf79a017aa3377a782d10f6 GREEN bba938b43756ce6f35c338f6cef21c3ab5d49a9d GREEN 0dc67f9de11a84e6e4c6e1eb627817dee91ff30a GREEN 5c3a0126fdca5d5b4fb441694747e1cb0f49cd9f GREEN 5739dd16f0212e8f94927c0a0f51503390f2be69 GREEN d81dfc551baa832f2761b4804760dcd8f57b7c5b YELLOW c49fca2de5a8cb7502fb28cc2b7e64a272df11b0 GREEN ab9d8682233313c21c6a52b8b03e1c796aacd29c GREEN 913cebbac2a5628bdd08b4df669b9412d6e07d94 GREEN
......@@ -104,6 +104,18 @@ public class AnnotationUtils {
return value;
* Sets the value of type {@code U} for the given annotation {@code clazz} in the specification
* list of the given {@link IModelElement}.
public static <T extends IAnnotatedSpecification, U> void setAnnotationValue(
IModelElement modelElement, Class<T> clazz, U value) throws Exception {
IAnnotationValueProvider<T> annValProvider =
getAnnotationValueProvider(modelElement, clazz);
T annotation = getAnnotation(modelElement, clazz);
annValProvider.setAnnotationValue(value, annotation);
* Predicate if for the given {@link IModelElement}, an annotation of the given {@code type} has
* been registered.
......@@ -316,6 +328,5 @@ public class AnnotationUtils {
for(IModelElement child : getChildrenWithType(element, IModelElement.class)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment