1 /*******************************************************************************
2  * Copyright (c) 2007, 2018 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.pde.api.tools.internal.provisional.comparator;
15 
16 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
17 
18 /**
19  * Interface that represents a delta. This interface is not intended to be
20  * implemented or extended by the client.
21  */
22 public interface IDelta {
23 	/**
24 	 * Status constant indicating that the element has been added.
25 	 */
26 	public int ADDED = 1;
27 	/**
28 	 * Status constant indicating that the element has been changed, as
29 	 * described by the change flags.
30 	 *
31 	 * @see #getFlags()
32 	 */
33 	public int CHANGED = 2;
34 
35 	/**
36 	 * Status constant indicating that the element has been removed.
37 	 */
38 	public int REMOVED = 3;
39 
40 	/**
41 	 * Element type constant indicating that the delta is reported against an
42 	 * annotation type declaration.
43 	 *
44 	 * @see #getElementType()
45 	 */
46 	public static final int ANNOTATION_ELEMENT_TYPE = 1;
47 
48 	/**
49 	 * Element type constant indicating that the delta is reported against an
50 	 * API component.
51 	 *
52 	 * @see #getElementType()
53 	 */
54 	public static final int API_COMPONENT_ELEMENT_TYPE = 2;
55 
56 	/**
57 	 * Element type constant indicating that the delta is reported against an
58 	 * API baseline.
59 	 *
60 	 * @see #getElementType()
61 	 */
62 	public static final int API_BASELINE_ELEMENT_TYPE = 3;
63 
64 	/**
65 	 * Element type constant indicating that the delta is reported against a
66 	 * class type declaration.
67 	 *
68 	 * @see #getElementType()
69 	 */
70 	public static final int CLASS_ELEMENT_TYPE = 4;
71 
72 	/**
73 	 * Element type constant indicating that the delta is reported against a
74 	 * constructor declaration.
75 	 *
76 	 * @see #getElementType()
77 	 */
78 	public static final int CONSTRUCTOR_ELEMENT_TYPE = 5;
79 
80 	/**
81 	 * Element type constant indicating that the delta is reported against an
82 	 * enum type declaration.
83 	 *
84 	 * @see #getElementType()
85 	 */
86 	public static final int ENUM_ELEMENT_TYPE = 6;
87 
88 	/**
89 	 * Element type constant indicating that the delta is reported against a
90 	 * field declaration.
91 	 *
92 	 * @see #getElementType()
93 	 */
94 	public static final int FIELD_ELEMENT_TYPE = 7;
95 
96 	/**
97 	 * Element type constant indicating that the delta is reported against an
98 	 * interface type declaration.
99 	 *
100 	 * @see #getElementType()
101 	 */
102 	public static final int INTERFACE_ELEMENT_TYPE = 8;
103 
104 	/**
105 	 * Element type constant indicating that the delta is reported against a
106 	 * method declaration.
107 	 *
108 	 * @see #getElementType()
109 	 */
110 	public static final int METHOD_ELEMENT_TYPE = 9;
111 	/**
112 	 * Element type constant indicating that the delta is reported against a
113 	 * type parameter.
114 	 *
115 	 * @see #getElementType()
116 	 */
117 	public static final int TYPE_PARAMETER_ELEMENT_TYPE = 10;
118 
119 	/**
120 	 * Delta kind flag that denotes removing the abstract keyword from a member. <br>
121 	 * Applies to kinds:
122 	 * <ul>
123 	 * <li>{@link #CHANGED}</li>
124 	 * </ul>
125 	 *
126 	 * @see #getFlags()
127 	 */
128 	public static final int ABSTRACT_TO_NON_ABSTRACT = 1;
129 	/**
130 	 * Delta kind flag that denotes the default value of an annotation. <br>
131 	 * Applies to kinds:
132 	 * <ul>
133 	 * <li>{@link #ADDED}</li>
134 	 * <li>{@link #CHANGED}</li>
135 	 * <li>{@link #REMOVED}</li>
136 	 * </ul>
137 	 *
138 	 * @see #getFlags()
139 	 */
140 	public static final int ANNOTATION_DEFAULT_VALUE = 2;
141 	/**
142 	 * Delta kind flag that denotes an {@link IApiComponent}. <br>
143 	 * Applies to kinds:
144 	 * <ul>
145 	 * <li>{@link #ADDED}</li>
146 	 * <li>{@link #REMOVED}</li>
147 	 * </ul>
148 	 *
149 	 * @see #getFlags()
150 	 */
151 	public static final int API_COMPONENT = 3;
152 	/**
153 	 * Delta kind flag that denotes changing an array of objects to a Java 1.5
154 	 * varargs. <br>
155 	 * Applies to kinds:
156 	 * <ul>
157 	 * <li>{@link #CHANGED}</li>
158 	 * </ul>
159 	 *
160 	 * @see #getFlags()
161 	 */
162 	public static final int ARRAY_TO_VARARGS = 4;
163 	/**
164 	 * Delta kind flag that denotes a checked exception. <br>
165 	 * Applies to kinds:
166 	 * <ul>
167 	 * <li>{@link #ADDED}</li>
168 	 * <li>{@link #REMOVED}</li>
169 	 * </ul>
170 	 *
171 	 * @see #getFlags()
172 	 */
173 	public static final int CHECKED_EXCEPTION = 5;
174 	/**
175 	 * Delta kind flag that denotes a Java 1.5 generics class bound. <br>
176 	 * Applies to kinds:
177 	 * <ul>
178 	 * <li>{@link #ADDED}</li>
179 	 * <li>{@link #CHANGED}</li>
180 	 * <li>{@link #REMOVED}</li>
181 	 * </ul>
182 	 *
183 	 * @see #getFlags()
184 	 */
185 	public static final int CLASS_BOUND = 6;
186 	/**
187 	 * Delta kind flag that denotes a static initializer. <br>
188 	 * Applies to kinds:
189 	 * <ul>
190 	 * <li>{@link #ADDED}</li>
191 	 * <li>{@link #CHANGED}</li>
192 	 * <li>{@link #REMOVED}</li>
193 	 * </ul>
194 	 *
195 	 * @see #getFlags()
196 	 */
197 	public static final int CLINIT = 7;
198 	/**
199 	 * Delta kind flag that denotes a constructor. <br>
200 	 * Applies to kinds:
201 	 * <ul>
202 	 * <li>{@link #ADDED}</li>
203 	 * <li>{@link #REMOVED}</li>
204 	 * </ul>
205 	 *
206 	 * @see #getFlags()
207 	 */
208 	public static final int CONSTRUCTOR = 8;
209 	/**
210 	 * Delta kind flag that denotes an interface in the super-interface set has
211 	 * been removed. <br>
212 	 * Applies to kinds:
213 	 * <ul>
214 	 * <li>{@link #CHANGED}</li>
215 	 * </ul>
216 	 *
217 	 * @see #getFlags()
218 	 */
219 	public static final int CONTRACTED_SUPERINTERFACES_SET = 10;
220 	/**
221 	 * Delta kind flag that denotes decreasing the access of a member. <br>
222 	 * Applies to kinds:
223 	 * <ul>
224 	 * <li>{@link #CHANGED}</li>
225 	 * </ul>
226 	 *
227 	 * @see #getFlags()
228 	 */
229 	public static final int DECREASE_ACCESS = 11;
230 	/**
231 	 * Delta kind flag that denotes a constant value enum. <br>
232 	 * Applies to kinds:
233 	 * <ul>
234 	 * <li>{@link #ADDED}</li>
235 	 * <li>{@link #REMOVED}</li>
236 	 * </ul>
237 	 *
238 	 * @see #getFlags()
239 	 */
240 	public static final int ENUM_CONSTANT = 12;
241 	/**
242 	 * Delta kind flag that denotes and execution environment. <br>
243 	 * Applies to kinds:
244 	 * <ul>
245 	 * <li>{@link #ADDED}</li>
246 	 * <li>{@link #REMOVED}</li>
247 	 * </ul>
248 	 *
249 	 * @see #getFlags()
250 	 */
251 	public static final int EXECUTION_ENVIRONMENT = 13;
252 	/**
253 	 * Delta kind flag that denotes an interface has been added to the current set
254 	 * of super-interfaces and this change is a non-breaking change. <br>
255 	 * Applies to kinds:
256 	 * <ul>
257 	 * <li>{@link #CHANGED}</li>
258 	 * </ul>
259 	 *
260 	 * @see #getFlags()
261 	 */
262 	public static final int EXPANDED_SUPERINTERFACES_SET = 15;
263 	/**
264 	 * Delta kind flag that denotes an interface has been added to the current set
265 	 * of super-interfaces that is a breaking change <br>
266 	 * Applies to kinds:
267 	 * <ul>
268 	 * <li>{@link #CHANGED}</li>
269 	 * </ul>
270 	 *
271 	 * @see #getFlags()
272 	 */
273 	public static final int EXPANDED_SUPERINTERFACES_SET_BREAKING = 42;
274 
275 	/**
276 	 * Delta kind flag that denotes a field has been added or removed. <br>
277 	 * Applies to kinds:
278 	 * <ul>
279 	 * <li>{@link #ADDED}</li>
280 	 * <li>{@link #REMOVED}</li>
281 	 * </ul>
282 	 *
283 	 * @see #getFlags()
284 	 */
285 	public static final int FIELD = 16;
286 	/**
287 	 * Delta kind flag that denotes a field has been moved up the current
288 	 * super-class hierarchy. <br>
289 	 * Applies to kinds:
290 	 * <ul>
291 	 * <li>{@link #REMOVED}</li>
292 	 * </ul>
293 	 *
294 	 * @see #getFlags()
295 	 */
296 	public static final int FIELD_MOVED_UP = 17;
297 	/**
298 	 * Delta kind flag that denotes the final keyword has been removed from a
299 	 * member. <br>
300 	 * Applies to kinds:
301 	 * <ul>
302 	 * <li>{@link #CHANGED}</li>
303 	 * </ul>
304 	 *
305 	 * @see #getFlags()
306 	 */
307 	public static final int FINAL_TO_NON_FINAL = 18;
308 	/**
309 	 * Delta kind flag that denotes that the final keyword has been removed from
310 	 * a static member. <br>
311 	 * Applies to kinds:
312 	 * <ul>
313 	 * <li>{@link #CHANGED}</li>
314 	 * </ul>
315 	 *
316 	 * @see #getFlags()
317 	 */
318 	public static final int FINAL_TO_NON_FINAL_NON_STATIC = 19;
319 	/**
320 	 * Delta kind flag that denotes the final keyword has been removed from a
321 	 * constant field. <br>
322 	 * Applies to kinds:
323 	 * <ul>
324 	 * <li>{@link #CHANGED}</li>
325 	 * </ul>
326 	 *
327 	 * @see #getFlags()
328 	 */
329 	public static final int FINAL_TO_NON_FINAL_STATIC_CONSTANT = 20;
330 	/**
331 	 * Delta kind flag that denotes the final keyword has been removed from a
332 	 * non-constant field. <br>
333 	 * Applies to kinds:
334 	 * <ul>
335 	 * <li>{@link #CHANGED}</li>
336 	 * </ul>
337 	 *
338 	 * @see #getFlags()
339 	 */
340 	public static final int FINAL_TO_NON_FINAL_STATIC_NON_CONSTANT = 21;
341 	/**
342 	 * Delta kind flag that denotes the access to a member has been increased. <br>
343 	 * Applies to kinds:
344 	 * <ul>
345 	 * <li>{@link #CHANGED}</li>
346 	 * </ul>
347 	 *
348 	 * @see #getFlags()
349 	 */
350 	public static final int INCREASE_ACCESS = 22;
351 	/**
352 	 * Delta kind flag that denotes a Java 1.5 interface bound has been changed. <br>
353 	 * Applies to kinds:
354 	 * <ul>
355 	 * <li>{@link #ADDED}</li>
356 	 * <li>{@link #CHANGED}</li>
357 	 * <li>{@link #REMOVED}</li>
358 	 * </ul>
359 	 *
360 	 * @see #getFlags()
361 	 */
362 	public static final int INTERFACE_BOUND = 23;
363 	/**
364 	 * Delta kind flag that denotes a method has been added or removed. <br>
365 	 * Applies to kinds:
366 	 * <ul>
367 	 * <li>{@link #ADDED}</li>
368 	 * <li>{@link #REMOVED}</li>
369 	 * </ul>
370 	 *
371 	 * @see #getFlags()
372 	 */
373 	public static final int METHOD = 25;
374 	/**
375 	 * Delta kind flag that denotes a method has moved up the super-class
376 	 * hierarchy. <br>
377 	 * Applies to kinds:
378 	 * <ul>
379 	 * <li>{@link #REMOVED}</li>
380 	 * </ul>
381 	 *
382 	 * @see #getFlags()
383 	 */
384 	public static final int METHOD_MOVED_UP = 26;
385 	/**
386 	 * Delta kind flag that denotes a method with a default value has been added
387 	 * or removed. <br>
388 	 * Applies to kinds:
389 	 * <ul>
390 	 * <li>{@link #ADDED}</li>
391 	 * <li>{@link #REMOVED}</li>
392 	 * </ul>
393 	 *
394 	 * @see #getFlags()
395 	 */
396 	public static final int METHOD_WITH_DEFAULT_VALUE = 27;
397 	/**
398 	 * Delta kind flag that denotes a method without a default value has been
399 	 * added or removed. <br>
400 	 * Applies to kinds:
401 	 * <ul>
402 	 * <li>{@link #ADDED}</li>
403 	 * <li>{@link #REMOVED}</li>
404 	 * </ul>
405 	 *
406 	 * @see #getFlags()
407 	 */
408 	public static final int METHOD_WITHOUT_DEFAULT_VALUE = 28;
409 	/**
410 	 * Delta kind flag that denotes the native keyword has been removed. <br>
411 	 * Applies to kinds:
412 	 * <ul>
413 	 * <li>{@link #CHANGED}</li>
414 	 * </ul>
415 	 *
416 	 * @see #getFlags()
417 	 */
418 	public static final int NATIVE_TO_NON_NATIVE = 29;
419 	/**
420 	 * Delta kind flag that denotes the abstract keyword has been added. <br>
421 	 * Applies to kinds:
422 	 * <ul>
423 	 * <li>{@link #CHANGED}</li>
424 	 * </ul>
425 	 *
426 	 * @see #getFlags()
427 	 */
428 	public static final int NON_ABSTRACT_TO_ABSTRACT = 30;
429 	/**
430 	 * Delta kind flag that denotes the final keyword has been added. <br>
431 	 * Applies to kinds:
432 	 * <ul>
433 	 * <li>{@link #CHANGED}</li>
434 	 * </ul>
435 	 *
436 	 * @see #getFlags()
437 	 */
438 	public static final int NON_FINAL_TO_FINAL = 31;
439 	/**
440 	 * Delta kind flag that denotes the native keyword has been added. <br>
441 	 * Applies to kinds:
442 	 * <ul>
443 	 * <li>{@link #CHANGED}</li>
444 	 * </ul>
445 	 *
446 	 * @see #getFlags()
447 	 */
448 	public static final int NON_NATIVE_TO_NATIVE = 32;
449 	/**
450 	 * Delta kind flag that denotes the static keyword has been added. <br>
451 	 * Applies to kinds:
452 	 * <ul>
453 	 * <li>{@link #CHANGED}</li>
454 	 * </ul>
455 	 *
456 	 * @see #getFlags()
457 	 */
458 	public static final int NON_STATIC_TO_STATIC = 33;
459 	/**
460 	 * Delta kind flag that denotes the synchronized keyword has been added. <br>
461 	 * Applies to kinds:
462 	 * <ul>
463 	 * <li>{@link #CHANGED}</li>
464 	 * </ul>
465 	 *
466 	 * @see #getFlags()
467 	 */
468 	public static final int NON_SYNCHRONIZED_TO_SYNCHRONIZED = 34;
469 	/**
470 	 * Delta kind flag that denotes the transient keyword has been added. <br>
471 	 * Applies to kinds:
472 	 * <ul>
473 	 * <li>{@link #CHANGED}</li>
474 	 * </ul>
475 	 *
476 	 * @see #getFlags()
477 	 */
478 	public static final int NON_TRANSIENT_TO_TRANSIENT = 35;
479 	/**
480 	 * Delta kind flag that denotes a method addition that is overriding a
481 	 * method from a superclass <br>
482 	 * Applies to kinds:
483 	 * <ul>
484 	 * <li>{@link #ADDED}</li>
485 	 * </ul>
486 	 *
487 	 * @see #getFlags()
488 	 */
489 	public static final int OVERRIDEN_METHOD = 36;
490 	/**
491 	 * Delta kind flag that denotes API restrictions on a member have been
492 	 * added. <br>
493 	 * Applies to kinds:
494 	 * <ul>
495 	 * <li>{@link #ADDED}</li>
496 	 * </ul>
497 	 *
498 	 * @see #getFlags()
499 	 */
500 	public static final int RESTRICTIONS = 37;
501 	/**
502 	 * Delta kind flag that denotes the static keyword has been removed. <br>
503 	 * Applies to kinds:
504 	 * <ul>
505 	 * <li>{@link #CHANGED}</li>
506 	 * </ul>
507 	 *
508 	 * @see #getFlags()
509 	 */
510 	public static final int STATIC_TO_NON_STATIC = 38;
511 	/**
512 	 * Delta kind flag that denotes a super-class has been added ( non-breaking change), or removed. <br>
513 	 * Applies to kinds:
514 	 * <ul>
515 	 * <li>{@link #ADDED}</li>
516 	 * <li>{@link #REMOVED}</li>
517 	 * </ul>
518 	 *
519 	 * @see #getFlags()
520 	 */
521 	public static final int SUPERCLASS = 39;
522 	/**
523 	 * Delta kind flag that denotes a super-class has been added that is a breaking change <br>
524 	 * Applies to kinds:
525 	 * <ul>
526 	 * <li>{@link #ADDED}</li>
527 	 * </ul>
528 	 *
529 	 * @see #getFlags()
530 	 */
531 	public static final int SUPERCLASS_BREAKING = 43;
532 	/**
533 	 * Delta kind flag that denotes the synchronized keyword has been removed. <br>
534 	 * Applies to kinds:
535 	 * <ul>
536 	 * <li>{@link #CHANGED}</li>
537 	 * </ul>
538 	 *
539 	 * @see #getFlags()
540 	 */
541 	public static final int SYNCHRONIZED_TO_NON_SYNCHRONIZED = 40;
542 	/**
543 	 * Delta kind flag that denotes a type has been converted to a different
544 	 * kind. For example, from a class to an annotation. <br>
545 	 * Applies to kinds:
546 	 * <ul>
547 	 * <li>{@link #CHANGED}</li>
548 	 * </ul>
549 	 *
550 	 * @see #getFlags()
551 	 */
552 	public static final int TYPE_CONVERSION = 41;
553 	/**
554 	 * Delta kind flag that denotes the transient keyword has been removed. <br>
555 	 * Applies to kinds:
556 	 * <ul>
557 	 * <li>{@link #CHANGED}</li>
558 	 * </ul>
559 	 *
560 	 * @see #getFlags()
561 	 */
562 	public static final int TRANSIENT_TO_NON_TRANSIENT = 45;
563 	/**
564 	 * Delta kind flag that denotes a type has changed in some way. <br>
565 	 * Applies to kinds:
566 	 * <ul>
567 	 * <li>{@link #ADDED}</li>
568 	 * <li>{@link #CHANGED}</li>
569 	 * <li>{@link #REMOVED}</li>
570 	 * </ul>
571 	 *
572 	 * @see #getFlags()
573 	 */
574 	public static final int TYPE = 46;
575 	/**
576 	 * Delta kind flag that denotes type arguments have been added or removed. <br>
577 	 * Applies to kinds:
578 	 * <ul>
579 	 * <li>{@link #ADDED}</li>
580 	 * </ul>
581 	 *
582 	 * @see #getFlags()
583 	 */
584 	public static final int TYPE_ARGUMENTS = 47;
585 	/**
586 	 * Delta kind flag that denotes a type member has been added or removed from
587 	 * a type. <br>
588 	 * Applies to kinds:
589 	 * <ul>
590 	 * <li>{@link #ADDED}</li>
591 	 * <li>{@link #REMOVED}</li>
592 	 * </ul>
593 	 *
594 	 * @see #getFlags()
595 	 */
596 	public static final int TYPE_MEMBER = 48;
597 	/**
598 	 * Delta kind flag that denotes a type parameter has been added or removed. <br>
599 	 * Applies to kinds:
600 	 * <ul>
601 	 * <li>{@link #ADDED}</li>
602 	 * <li>{@link #REMOVED}</li>
603 	 * </ul>
604 	 *
605 	 * @see #getFlags()
606 	 */
607 	public static final int TYPE_PARAMETER = 49;
608 	/**
609 	 * Delta kind flag that a type parameter name has changed. <br>
610 	 * Applies to kinds:
611 	 * <ul>
612 	 * <li>{@link #CHANGED}</li>
613 	 * </ul>
614 	 *
615 	 * @see #getFlags()
616 	 */
617 	public static final int TYPE_PARAMETER_NAME = 50;
618 	/**
619 	 * Delta kind flag that denotes type parameters have been added to a type
620 	 * that didn't have type parameters before. <br>
621 	 * Applies to kinds:
622 	 * <ul>
623 	 * <li>{@link #ADDED}</li>
624 	 * </ul>
625 	 *
626 	 * @see #getFlags()
627 	 */
628 	public static final int TYPE_PARAMETERS = 51;
629 	/**
630 	 * Delta kind flag that denotes the visibility of a type has changed. <br>
631 	 * Applies to kinds:
632 	 * <ul>
633 	 * <li>{@link #CHANGED}</li>
634 	 * </ul>
635 	 *
636 	 * @see #getFlags()
637 	 */
638 	public static final int TYPE_VISIBILITY = 52;
639 	/**
640 	 * Delta kind flag that denotes an unchecked exception has been added or
641 	 * removed. <br>
642 	 * Applies to kinds:
643 	 * <ul>
644 	 * <li>{@link #ADDED}</li>
645 	 * <li>{@link #REMOVED}</li>
646 	 * </ul>
647 	 *
648 	 * @see #getFlags()
649 	 */
650 	public static final int UNCHECKED_EXCEPTION = 53;
651 	/**
652 	 * Delta kind flag that denotes the value of a member has changed in some
653 	 * way. <br>
654 	 * Applies to kinds:
655 	 * <ul>
656 	 * <li>{@link #ADDED}</li>
657 	 * <li>{@link #CHANGED}</li>
658 	 * <li>{@link #REMOVED}</li>
659 	 * </ul>
660 	 *
661 	 * @see #getFlags()
662 	 */
663 	public static final int VALUE = 54;
664 	/**
665 	 * Delta kind flag that denotes changing a Java 1.5 varargs to an array of
666 	 * {@link Object}s. <br>
667 	 * Applies to kinds:
668 	 * <ul>
669 	 * <li>{@link #CHANGED}</li>
670 	 * </ul>
671 	 *
672 	 * @see #getFlags()
673 	 */
674 	public static final int VARARGS_TO_ARRAY = 55;
675 	/**
676 	 * Delta kind flag that denotes changing the visibility of a type from
677 	 * VisibilityModifiers.API to another visibility. As a consequence, the
678 	 * corresponding type is no longer an API type. <br>
679 	 * Applies to kinds:
680 	 * <ul>
681 	 * <li>{@link #REMOVED}</li>
682 	 * </ul>
683 	 *
684 	 * @see #getFlags()
685 	 */
686 	public static final int API_TYPE = 56;
687 	/**
688 	 * Delta kind flag that denotes the volatile keyword has been added. <br>
689 	 * Applies to kinds:
690 	 * <ul>
691 	 * <li>{@link #CHANGED}</li>
692 	 * </ul>
693 	 *
694 	 * @see #getFlags()
695 	 */
696 	public static final int NON_VOLATILE_TO_VOLATILE = 57;
697 	/**
698 	 * Delta kind flag that denotes the volatile keyword has been removed. <br>
699 	 * Applies to kinds:
700 	 * <ul>
701 	 * <li>{@link #CHANGED}</li>
702 	 * </ul>
703 	 *
704 	 * @see #getFlags()
705 	 */
706 	public static final int VOLATILE_TO_NON_VOLATILE = 58;
707 	/**
708 	 * Delta kind flag that denotes changing the major version of a bundle. <br>
709 	 * Applies to kinds:
710 	 * <ul>
711 	 * <li>{@link #CHANGED}</li>
712 	 * </ul>
713 	 *
714 	 * @see #getFlags()
715 	 */
716 	public static final int MAJOR_VERSION = 59;
717 	/**
718 	 * Delta kind flag that denotes changing the minor version of a bundle. <br>
719 	 * Applies to kinds:
720 	 * <ul>
721 	 * <li>{@link #CHANGED}</li>
722 	 * </ul>
723 	 *
724 	 * @see #getFlags()
725 	 */
726 	public static final int MINOR_VERSION = 60;
727 	/**
728 	 * Delta kind flag that denotes adding @noreference restrictions to an API
729 	 * field. As a consequence, the corresponding field is no longer an API
730 	 * field. <br>
731 	 * Applies to kinds:
732 	 * <ul>
733 	 * <li>{@link #REMOVED}</li>
734 	 * </ul>
735 	 *
736 	 * @see #getFlags()
737 	 */
738 	public static final int API_FIELD = 61;
739 	/**
740 	 * Delta kind flag that denotes adding @noreference restrictions to an API
741 	 * method. As a consequence, the corresponding method is no longer an API
742 	 * method. <br>
743 	 * Applies to kinds:
744 	 * <ul>
745 	 * <li>{@link #REMOVED}</li>
746 	 * </ul>
747 	 *
748 	 * @see #getFlags()
749 	 */
750 	public static final int API_METHOD = 62;
751 	/**
752 	 * Delta kind flag that denotes adding @noreference restrictions to an API
753 	 * constructor. As a consequence, the corresponding constructor is no longer
754 	 * an API constructor. <br>
755 	 * Applies to kinds:
756 	 * <ul>
757 	 * <li>{@link #REMOVED}</li>
758 	 * </ul>
759 	 *
760 	 * @see #getFlags()
761 	 */
762 	public static final int API_CONSTRUCTOR = 63;
763 	/**
764 	 * Delta kind flag that denotes adding @noreference restrictions to an API
765 	 * enum constant. As a consequence, the corresponding enum constant is no
766 	 * longer an API enum constant. <br>
767 	 * Applies to kinds:
768 	 * <ul>
769 	 * <li>{@link #REMOVED}</li>
770 	 * </ul>
771 	 *
772 	 * @see #getFlags()
773 	 */
774 	public static final int API_ENUM_CONSTANT = 64;
775 	/**
776 	 * Delta kind flag that denotes adding @noreference restrictions to an API
777 	 * enum constant. As a consequence, the corresponding enum constant is no
778 	 * longer an API enum constant. <br>
779 	 * Applies to kinds:
780 	 * <ul>
781 	 * <li>{@link #REMOVED}</li>
782 	 * </ul>
783 	 *
784 	 * @see #getFlags()
785 	 */
786 	public static final int API_METHOD_WITH_DEFAULT_VALUE = 65;
787 	/**
788 	 * Delta kind flag that denotes adding @noreference restrictions to an API
789 	 * enum constant. As a consequence, the corresponding enum constant is no
790 	 * longer an API enum constant. <br>
791 	 * Applies to kinds:
792 	 * <ul>
793 	 * <li>{@link #REMOVED}</li>
794 	 * </ul>
795 	 *
796 	 * @see #getFlags()
797 	 */
798 	public static final int API_METHOD_WITHOUT_DEFAULT_VALUE = 66;
799 	/**
800 	 * Delta kind flag that denotes a method has moved down in the type
801 	 * hierarchy. <br>
802 	 * Applies to kinds:
803 	 * <ul>
804 	 * <li>{@link #ADDED}</li>
805 	 * </ul>
806 	 *
807 	 * @see #getFlags()
808 	 */
809 	public static final int METHOD_MOVED_DOWN = 67;
810 	/**
811 	 * Delta kind flag that denotes that a type argument has been added or
812 	 * removed. <br>
813 	 * Applies to kinds:
814 	 * <ul>
815 	 * <li>{@link #ADDED}</li>
816 	 * <li>{@link #CHANGED}</li>
817 	 * <li>{@link #REMOVED}</li>
818 	 * </ul>
819 	 *
820 	 * @see #getFlags()
821 	 */
822 	public static final int TYPE_ARGUMENT = 68;
823 	/**
824 	 * Delta kind flag that denotes that an interface got a super interface with
825 	 * methods. <br>
826 	 * Applies to kinds:
827 	 * <ul>
828 	 * <li>{@link #ADDED}</li>
829 	 * </ul>
830 	 *
831 	 * @see #getFlags()
832 	 */
833 	public static final int SUPER_INTERFACE_WITH_METHODS = 69;
834 	/**
835 	 * Delta kind flag that denotes a re-exported type has been added or
836 	 * removed. <br>
837 	 * Applies to kinds:
838 	 * <ul>
839 	 * <li>{@link #ADDED}</li>
840 	 * <li>{@link #REMOVED}</li>
841 	 * </ul>
842 	 *
843 	 * @see #getFlags()
844 	 */
845 	public static final int REEXPORTED_TYPE = 70;
846 	/**
847 	 * Delta kind flag that denotes changing the visibility of a re-exported
848 	 * type from VisibilityModifiers.API to another visibility. As a
849 	 * consequence, the corresponding re-exported type is no longer an API type. <br>
850 	 * Applies to kinds:
851 	 * <ul>
852 	 * <li>{@link #REMOVED}</li>
853 	 * </ul>
854 	 *
855 	 * @see #getFlags()
856 	 */
857 	public static final int REEXPORTED_API_TYPE = 71;
858 	/**
859 	 * Delta kind flag that denotes adding or removing the deprecated modifiers
860 	 * on the corresponding element. <br>
861 	 * Applies to kinds:
862 	 * <ul>
863 	 * <li>{@link #ADDED}</li>
864 	 * <li>{@link #REMOVED}</li>
865 	 * </ul>
866 	 *
867 	 * @see #getFlags()
868 	 */
869 	public static final int DEPRECATION = 72;
870 
871 	/**
872 	 * Delta kind flag that denotes a default method has been added or removed.
873 	 * <br>
874 	 * Applies to kinds:
875 	 * <ul>
876 	 * <li>{@link #ADDED}</li>
877 	 * <li>{@link #REMOVED}</li>
878 	 * </ul>
879 	 *
880 	 * @see #getFlags()
881 	 */
882 	public static final int DEFAULT_METHOD = 73;
883 	/**
884 	 * Delta kind flag that denotes that an default method added to interface
885 	 * which has super interface with same method. <br>
886 	 * Applies to kinds:
887 	 * <ul>
888 	 * <li>{@link #ADDED}</li>
889 	 * </ul>
890 	 *
891 	 * @see #getFlags()
892 	 */
893 	public static final int SUPER_INTERFACE_DEFAULT_METHOD = 74;
894 
895 	/**
896 	 * Return true if the receiver has no children deltas, false otherwise.
897 	 *
898 	 * @return true if the receiver has no children deltas, false otherwise.
899 	 */
isEmpty()900 	public boolean isEmpty();
901 
902 	/**
903 	 * Returns the key of this delta.
904 	 *
905 	 * @return the key of this delta
906 	 */
getKey()907 	public String getKey();
908 
909 	/**
910 	 * Returns the kind of this delta that describe how an element has changed.
911 	 *
912 	 * @return the kind of this delta that describe how an element has changed
913 	 */
getKind()914 	public int getKind();
915 
916 	/**
917 	 * Returns flags that describe how an element has changed.
918 	 *
919 	 * @return flags that describe how an element has changed
920 	 */
getFlags()921 	public int getFlags();
922 
923 	/**
924 	 * Returns the type of the element on which a delta occurred. Any of
925 	 * {@link IDelta#ANNOTATION_ELEMENT_TYPE}, {@link IDelta#ENUM_ELEMENT_TYPE},
926 	 * {@link IDelta#CONSTRUCTOR_ELEMENT_TYPE},
927 	 * {@link IDelta#METHOD_ELEMENT_TYPE}, {@link IDelta#INTERFACE_ELEMENT_TYPE}
928 	 * , {@link IDelta#CLASS_ELEMENT_TYPE}, {@link IDelta#FIELD_ELEMENT_TYPE},
929 	 * {@link IDelta#API_COMPONENT_ELEMENT_TYPE} and
930 	 * {@link IDelta#API_PROFILE_ELEMENT_TYPE}.
931 	 *
932 	 * @return flags that describe how an element has changed
933 	 */
getElementType()934 	public int getElementType();
935 
936 	/**
937 	 * Returns the children of the receiver. Return an empty list if none
938 	 *
939 	 * @return children of the receiver
940 	 */
getChildren()941 	public IDelta[] getChildren();
942 
943 	/**
944 	 * Traverse the given delta and apply the visitor
945 	 *
946 	 * @param visitor the given delta visitor
947 	 */
accept(DeltaVisitor visitor)948 	public void accept(DeltaVisitor visitor);
949 
950 	/**
951 	 * Returns the type name against which the delta is returned.
952 	 *
953 	 * @return the type name against which the delta is returned.
954 	 */
getTypeName()955 	public String getTypeName();
956 
957 	/**
958 	 * Returns the delta's description. This can be used as an error message.
959 	 * The message is returned in the current locale.
960 	 *
961 	 * @return the delta's description
962 	 */
getMessage()963 	public String getMessage();
964 
965 	/**
966 	 * Returns the set of arguments that can be used to compose NLS'd messages.
967 	 * These arguments will typically be type, method and field names.
968 	 *
969 	 * @return the set of arguments to compose NLS'd messages
970 	 */
getArguments()971 	public String[] getArguments();
972 
973 	/**
974 	 * Returns the delta's current restrictions.
975 	 *
976 	 * @return the delta's current restrictions
977 	 */
getCurrentRestrictions()978 	public int getCurrentRestrictions();
979 
980 	/**
981 	 * Returns the delta's previous restrictions.
982 	 *
983 	 * @return the delta's previous restrictions
984 	 */
getPreviousRestrictions()985 	public int getPreviousRestrictions();
986 
987 	/**
988 	 * Returns the delta's new modifiers. This corresponds to the new modifiers
989 	 * of the affected element. by the delta.
990 	 *
991 	 * @return the delta's new modifiers
992 	 */
getNewModifiers()993 	public int getNewModifiers();
994 
995 	/**
996 	 * Returns the delta's old modifiers. This corresponds to the old modifiers
997 	 * of the affected element. by the delta.
998 	 *
999 	 * @return the delta's old modifiers
1000 	 */
getOldModifiers()1001 	public int getOldModifiers();
1002 
1003 	/**
1004 	 * Returns the component identifier including its version identifier in
1005 	 * which the given delta is reported, or <code>null</code>. Can be
1006 	 * <code>null</code> if the delta is reported against an API profile.
1007 	 *
1008 	 * @return the component id in which the given delta is reported, or
1009 	 *         <code>null</code> if none
1010 	 */
getComponentVersionId()1011 	public String getComponentVersionId();
1012 
1013 	/**
1014 	 * Returns the component identifier without its version identifier in which
1015 	 * the given delta is reported, or <code>null</code>. Can be
1016 	 * <code>null</code> if the delta is reported against an API profile.
1017 	 *
1018 	 * @return the component id in which the given delta is reported, or
1019 	 *         <code>null</code> if none
1020 	 */
getComponentId()1021 	public String getComponentId();
1022 }
1023