aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/Metrics-Calculation/SocialNetwork_plugin/src-gen/queries/MoreThenFiveSuperTypes.java
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/Metrics-Calculation/SocialNetwork_plugin/src-gen/queries/MoreThenFiveSuperTypes.java')
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/src-gen/queries/MoreThenFiveSuperTypes.java611
1 files changed, 0 insertions, 611 deletions
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/src-gen/queries/MoreThenFiveSuperTypes.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/src-gen/queries/MoreThenFiveSuperTypes.java
deleted file mode 100644
index 867ffd01..00000000
--- a/Metrics/Metrics-Calculation/SocialNetwork_plugin/src-gen/queries/MoreThenFiveSuperTypes.java
+++ /dev/null
@@ -1,611 +0,0 @@
1/**
2 * Generated from platform:/resource/SocialNetwork_plugin/queries/queries/Ecore.vql
3 */
4package queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
30import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
39import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
40import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
41import queries.SuperTypes;
42
43/**
44 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
45 *
46 * <p>Original source:
47 * <code><pre>
48 * {@literal @}Constraint(severity="error", message="error", key = {c})
49 * pattern moreThenFiveSuperTypes(c: EClass){
50 * find superTypes(c1, s1);
51 * find superTypes(c1, s2);
52 * find superTypes(c1, s3);
53 * find superTypes(c1, s4);
54 * find superTypes(c1, s5);
55 * s1 != s2;
56 * s1 != s3;
57 * s1 != s4;
58 * s1 != s5;
59 * s2 != s3;
60 * s2 != s4;
61 * s2 != s5;
62 * s3 != s4;
63 * s3 != s5;
64 * s4 != s5;
65 * }
66 * </pre></code>
67 *
68 * @see Matcher
69 * @see Match
70 *
71 */
72@SuppressWarnings("all")
73public final class MoreThenFiveSuperTypes extends BaseGeneratedEMFQuerySpecification<MoreThenFiveSuperTypes.Matcher> {
74 /**
75 * Pattern-specific match representation of the queries.moreThenFiveSuperTypes pattern,
76 * to be used in conjunction with {@link Matcher}.
77 *
78 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
79 * Each instance is a (possibly partial) substitution of pattern parameters,
80 * usable to represent a match of the pattern in the result of a query,
81 * or to specify the bound (fixed) input parameters when issuing a query.
82 *
83 * @see Matcher
84 *
85 */
86 public static abstract class Match extends BasePatternMatch {
87 private EClass fC;
88
89 private static List<String> parameterNames = makeImmutableList("c");
90
91 private Match(final EClass pC) {
92 this.fC = pC;
93 }
94
95 @Override
96 public Object get(final String parameterName) {
97 if ("c".equals(parameterName)) return this.fC;
98 return null;
99 }
100
101 public EClass getC() {
102 return this.fC;
103 }
104
105 @Override
106 public boolean set(final String parameterName, final Object newValue) {
107 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
108 if ("c".equals(parameterName) ) {
109 this.fC = (EClass) newValue;
110 return true;
111 }
112 return false;
113 }
114
115 public void setC(final EClass pC) {
116 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
117 this.fC = pC;
118 }
119
120 @Override
121 public String patternName() {
122 return "queries.moreThenFiveSuperTypes";
123 }
124
125 @Override
126 public List<String> parameterNames() {
127 return MoreThenFiveSuperTypes.Match.parameterNames;
128 }
129
130 @Override
131 public Object[] toArray() {
132 return new Object[]{fC};
133 }
134
135 @Override
136 public MoreThenFiveSuperTypes.Match toImmutable() {
137 return isMutable() ? newMatch(fC) : this;
138 }
139
140 @Override
141 public String prettyPrint() {
142 StringBuilder result = new StringBuilder();
143 result.append("\"c\"=" + prettyPrintValue(fC));
144 return result.toString();
145 }
146
147 @Override
148 public int hashCode() {
149 return Objects.hash(fC);
150 }
151
152 @Override
153 public boolean equals(final Object obj) {
154 if (this == obj)
155 return true;
156 if (obj == null) {
157 return false;
158 }
159 if ((obj instanceof MoreThenFiveSuperTypes.Match)) {
160 MoreThenFiveSuperTypes.Match other = (MoreThenFiveSuperTypes.Match) obj;
161 return Objects.equals(fC, other.fC);
162 } else {
163 // this should be infrequent
164 if (!(obj instanceof IPatternMatch)) {
165 return false;
166 }
167 IPatternMatch otherSig = (IPatternMatch) obj;
168 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
169 }
170 }
171
172 @Override
173 public MoreThenFiveSuperTypes specification() {
174 return MoreThenFiveSuperTypes.instance();
175 }
176
177 /**
178 * Returns an empty, mutable match.
179 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
180 *
181 * @return the empty match.
182 *
183 */
184 public static MoreThenFiveSuperTypes.Match newEmptyMatch() {
185 return new Mutable(null);
186 }
187
188 /**
189 * Returns a mutable (partial) match.
190 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
191 *
192 * @param pC the fixed value of pattern parameter c, or null if not bound.
193 * @return the new, mutable (partial) match object.
194 *
195 */
196 public static MoreThenFiveSuperTypes.Match newMutableMatch(final EClass pC) {
197 return new Mutable(pC);
198 }
199
200 /**
201 * Returns a new (partial) match.
202 * This can be used e.g. to call the matcher with a partial match.
203 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
204 * @param pC the fixed value of pattern parameter c, or null if not bound.
205 * @return the (partial) match object.
206 *
207 */
208 public static MoreThenFiveSuperTypes.Match newMatch(final EClass pC) {
209 return new Immutable(pC);
210 }
211
212 private static final class Mutable extends MoreThenFiveSuperTypes.Match {
213 Mutable(final EClass pC) {
214 super(pC);
215 }
216
217 @Override
218 public boolean isMutable() {
219 return true;
220 }
221 }
222
223 private static final class Immutable extends MoreThenFiveSuperTypes.Match {
224 Immutable(final EClass pC) {
225 super(pC);
226 }
227
228 @Override
229 public boolean isMutable() {
230 return false;
231 }
232 }
233 }
234
235 /**
236 * Generated pattern matcher API of the queries.moreThenFiveSuperTypes pattern,
237 * providing pattern-specific query methods.
238 *
239 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
240 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
241 *
242 * <p>Matches of the pattern will be represented as {@link Match}.
243 *
244 * <p>Original source:
245 * <code><pre>
246 * {@literal @}Constraint(severity="error", message="error", key = {c})
247 * pattern moreThenFiveSuperTypes(c: EClass){
248 * find superTypes(c1, s1);
249 * find superTypes(c1, s2);
250 * find superTypes(c1, s3);
251 * find superTypes(c1, s4);
252 * find superTypes(c1, s5);
253 * s1 != s2;
254 * s1 != s3;
255 * s1 != s4;
256 * s1 != s5;
257 * s2 != s3;
258 * s2 != s4;
259 * s2 != s5;
260 * s3 != s4;
261 * s3 != s5;
262 * s4 != s5;
263 * }
264 * </pre></code>
265 *
266 * @see Match
267 * @see MoreThenFiveSuperTypes
268 *
269 */
270 public static class Matcher extends BaseMatcher<MoreThenFiveSuperTypes.Match> {
271 /**
272 * Initializes the pattern matcher within an existing VIATRA Query engine.
273 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
274 *
275 * @param engine the existing VIATRA Query engine in which this matcher will be created.
276 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
277 *
278 */
279 public static MoreThenFiveSuperTypes.Matcher on(final ViatraQueryEngine engine) {
280 // check if matcher already exists
281 Matcher matcher = engine.getExistingMatcher(querySpecification());
282 if (matcher == null) {
283 matcher = (Matcher)engine.getMatcher(querySpecification());
284 }
285 return matcher;
286 }
287
288 /**
289 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
290 * @return an initialized matcher
291 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
292 *
293 */
294 public static MoreThenFiveSuperTypes.Matcher create() {
295 return new Matcher();
296 }
297
298 private static final int POSITION_C = 0;
299
300 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(MoreThenFiveSuperTypes.Matcher.class);
301
302 /**
303 * Initializes the pattern matcher within an existing VIATRA Query engine.
304 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
305 *
306 * @param engine the existing VIATRA Query engine in which this matcher will be created.
307 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
308 *
309 */
310 private Matcher() {
311 super(querySpecification());
312 }
313
314 /**
315 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
316 * @param pC the fixed value of pattern parameter c, or null if not bound.
317 * @return matches represented as a Match object.
318 *
319 */
320 public Collection<MoreThenFiveSuperTypes.Match> getAllMatches(final EClass pC) {
321 return rawStreamAllMatches(new Object[]{pC}).collect(Collectors.toSet());
322 }
323
324 /**
325 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
326 * </p>
327 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
328 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
329 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
330 * @param pC the fixed value of pattern parameter c, or null if not bound.
331 * @return a stream of matches represented as a Match object.
332 *
333 */
334 public Stream<MoreThenFiveSuperTypes.Match> streamAllMatches(final EClass pC) {
335 return rawStreamAllMatches(new Object[]{pC});
336 }
337
338 /**
339 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
340 * Neither determinism nor randomness of selection is guaranteed.
341 * @param pC the fixed value of pattern parameter c, or null if not bound.
342 * @return a match represented as a Match object, or null if no match is found.
343 *
344 */
345 public Optional<MoreThenFiveSuperTypes.Match> getOneArbitraryMatch(final EClass pC) {
346 return rawGetOneArbitraryMatch(new Object[]{pC});
347 }
348
349 /**
350 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
351 * under any possible substitution of the unspecified parameters (if any).
352 * @param pC the fixed value of pattern parameter c, or null if not bound.
353 * @return true if the input is a valid (partial) match of the pattern.
354 *
355 */
356 public boolean hasMatch(final EClass pC) {
357 return rawHasMatch(new Object[]{pC});
358 }
359
360 /**
361 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
362 * @param pC the fixed value of pattern parameter c, or null if not bound.
363 * @return the number of pattern matches found.
364 *
365 */
366 public int countMatches(final EClass pC) {
367 return rawCountMatches(new Object[]{pC});
368 }
369
370 /**
371 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
372 * Neither determinism nor randomness of selection is guaranteed.
373 * @param pC the fixed value of pattern parameter c, or null if not bound.
374 * @param processor the action that will process the selected match.
375 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
376 *
377 */
378 public boolean forOneArbitraryMatch(final EClass pC, final Consumer<? super MoreThenFiveSuperTypes.Match> processor) {
379 return rawForOneArbitraryMatch(new Object[]{pC}, processor);
380 }
381
382 /**
383 * Returns a new (partial) match.
384 * This can be used e.g. to call the matcher with a partial match.
385 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
386 * @param pC the fixed value of pattern parameter c, or null if not bound.
387 * @return the (partial) match object.
388 *
389 */
390 public MoreThenFiveSuperTypes.Match newMatch(final EClass pC) {
391 return MoreThenFiveSuperTypes.Match.newMatch(pC);
392 }
393
394 /**
395 * Retrieve the set of values that occur in matches for c.
396 * @return the Set of all values or empty set if there are no matches
397 *
398 */
399 protected Stream<EClass> rawStreamAllValuesOfc(final Object[] parameters) {
400 return rawStreamAllValues(POSITION_C, parameters).map(EClass.class::cast);
401 }
402
403 /**
404 * Retrieve the set of values that occur in matches for c.
405 * @return the Set of all values or empty set if there are no matches
406 *
407 */
408 public Set<EClass> getAllValuesOfc() {
409 return rawStreamAllValuesOfc(emptyArray()).collect(Collectors.toSet());
410 }
411
412 /**
413 * Retrieve the set of values that occur in matches for c.
414 * @return the Set of all values or empty set if there are no matches
415 *
416 */
417 public Stream<EClass> streamAllValuesOfc() {
418 return rawStreamAllValuesOfc(emptyArray());
419 }
420
421 @Override
422 protected MoreThenFiveSuperTypes.Match tupleToMatch(final Tuple t) {
423 try {
424 return MoreThenFiveSuperTypes.Match.newMatch((EClass) t.get(POSITION_C));
425 } catch(ClassCastException e) {
426 LOGGER.error("Element(s) in tuple not properly typed!",e);
427 return null;
428 }
429 }
430
431 @Override
432 protected MoreThenFiveSuperTypes.Match arrayToMatch(final Object[] match) {
433 try {
434 return MoreThenFiveSuperTypes.Match.newMatch((EClass) match[POSITION_C]);
435 } catch(ClassCastException e) {
436 LOGGER.error("Element(s) in array not properly typed!",e);
437 return null;
438 }
439 }
440
441 @Override
442 protected MoreThenFiveSuperTypes.Match arrayToMatchMutable(final Object[] match) {
443 try {
444 return MoreThenFiveSuperTypes.Match.newMutableMatch((EClass) match[POSITION_C]);
445 } catch(ClassCastException e) {
446 LOGGER.error("Element(s) in array not properly typed!",e);
447 return null;
448 }
449 }
450
451 /**
452 * @return the singleton instance of the query specification of this pattern
453 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
454 *
455 */
456 public static IQuerySpecification<MoreThenFiveSuperTypes.Matcher> querySpecification() {
457 return MoreThenFiveSuperTypes.instance();
458 }
459 }
460
461 private MoreThenFiveSuperTypes() {
462 super(GeneratedPQuery.INSTANCE);
463 }
464
465 /**
466 * @return the singleton instance of the query specification
467 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
468 *
469 */
470 public static MoreThenFiveSuperTypes instance() {
471 try{
472 return LazyHolder.INSTANCE;
473 } catch (ExceptionInInitializerError err) {
474 throw processInitializerError(err);
475 }
476 }
477
478 @Override
479 protected MoreThenFiveSuperTypes.Matcher instantiate(final ViatraQueryEngine engine) {
480 return MoreThenFiveSuperTypes.Matcher.on(engine);
481 }
482
483 @Override
484 public MoreThenFiveSuperTypes.Matcher instantiate() {
485 return MoreThenFiveSuperTypes.Matcher.create();
486 }
487
488 @Override
489 public MoreThenFiveSuperTypes.Match newEmptyMatch() {
490 return MoreThenFiveSuperTypes.Match.newEmptyMatch();
491 }
492
493 @Override
494 public MoreThenFiveSuperTypes.Match newMatch(final Object... parameters) {
495 return MoreThenFiveSuperTypes.Match.newMatch((org.eclipse.emf.ecore.EClass) parameters[0]);
496 }
497
498 /**
499 * Inner class allowing the singleton instance of {@link JvmGenericType: queries.MoreThenFiveSuperTypes (visibility: PUBLIC, simpleName: MoreThenFiveSuperTypes, identifier: queries.MoreThenFiveSuperTypes, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
500 * <b>not</b> at the class load time of the outer class,
501 * but rather at the first call to {@link JvmGenericType: queries.MoreThenFiveSuperTypes (visibility: PUBLIC, simpleName: MoreThenFiveSuperTypes, identifier: queries.MoreThenFiveSuperTypes, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
502 *
503 * <p> This workaround is required e.g. to support recursion.
504 *
505 */
506 private static class LazyHolder {
507 private static final MoreThenFiveSuperTypes INSTANCE = new MoreThenFiveSuperTypes();
508
509 /**
510 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
511 * This initialization order is required to support indirect recursion.
512 *
513 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
514 *
515 */
516 private static final Object STATIC_INITIALIZER = ensureInitialized();
517
518 public static Object ensureInitialized() {
519 INSTANCE.ensureInitializedInternal();
520 return null;
521 }
522 }
523
524 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
525 private static final MoreThenFiveSuperTypes.GeneratedPQuery INSTANCE = new GeneratedPQuery();
526
527 private final PParameter parameter_c = new PParameter("c", "org.eclipse.emf.ecore.EClass", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EClass")), PParameterDirection.INOUT);
528
529 private final List<PParameter> parameters = Arrays.asList(parameter_c);
530
531 private GeneratedPQuery() {
532 super(PVisibility.PUBLIC);
533 }
534
535 @Override
536 public String getFullyQualifiedName() {
537 return "queries.moreThenFiveSuperTypes";
538 }
539
540 @Override
541 public List<String> getParameterNames() {
542 return Arrays.asList("c");
543 }
544
545 @Override
546 public List<PParameter> getParameters() {
547 return parameters;
548 }
549
550 @Override
551 public Set<PBody> doGetContainedBodies() {
552 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
553 Set<PBody> bodies = new LinkedHashSet<>();
554 {
555 PBody body = new PBody(this);
556 PVariable var_c = body.getOrCreateVariableByName("c");
557 PVariable var_c1 = body.getOrCreateVariableByName("c1");
558 PVariable var_s1 = body.getOrCreateVariableByName("s1");
559 PVariable var_s2 = body.getOrCreateVariableByName("s2");
560 PVariable var_s3 = body.getOrCreateVariableByName("s3");
561 PVariable var_s4 = body.getOrCreateVariableByName("s4");
562 PVariable var_s5 = body.getOrCreateVariableByName("s5");
563 new TypeConstraint(body, Tuples.flatTupleOf(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
564 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
565 new ExportedParameter(body, var_c, parameter_c)
566 ));
567 // find superTypes(c1, s1)
568 new PositivePatternCall(body, Tuples.flatTupleOf(var_c1, var_s1), SuperTypes.instance().getInternalQueryRepresentation());
569 // find superTypes(c1, s2)
570 new PositivePatternCall(body, Tuples.flatTupleOf(var_c1, var_s2), SuperTypes.instance().getInternalQueryRepresentation());
571 // find superTypes(c1, s3)
572 new PositivePatternCall(body, Tuples.flatTupleOf(var_c1, var_s3), SuperTypes.instance().getInternalQueryRepresentation());
573 // find superTypes(c1, s4)
574 new PositivePatternCall(body, Tuples.flatTupleOf(var_c1, var_s4), SuperTypes.instance().getInternalQueryRepresentation());
575 // find superTypes(c1, s5)
576 new PositivePatternCall(body, Tuples.flatTupleOf(var_c1, var_s5), SuperTypes.instance().getInternalQueryRepresentation());
577 // s1 != s2
578 new Inequality(body, var_s1, var_s2);
579 // s1 != s3
580 new Inequality(body, var_s1, var_s3);
581 // s1 != s4
582 new Inequality(body, var_s1, var_s4);
583 // s1 != s5
584 new Inequality(body, var_s1, var_s5);
585 // s2 != s3
586 new Inequality(body, var_s2, var_s3);
587 // s2 != s4
588 new Inequality(body, var_s2, var_s4);
589 // s2 != s5
590 new Inequality(body, var_s2, var_s5);
591 // s3 != s4
592 new Inequality(body, var_s3, var_s4);
593 // s3 != s5
594 new Inequality(body, var_s3, var_s5);
595 // s4 != s5
596 new Inequality(body, var_s4, var_s5);
597 bodies.add(body);
598 }
599 {
600 PAnnotation annotation = new PAnnotation("Constraint");
601 annotation.addAttribute("severity", "error");
602 annotation.addAttribute("message", "error");
603 annotation.addAttribute("key", Arrays.asList(new Object[] {
604 new ParameterReference("c")
605 }));
606 addAnnotation(annotation);
607 }
608 return bodies;
609 }
610 }
611}