KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > processing > ProblemFixer


1 package spoon.processing;
2
3 import spoon.reflect.Changes;
4 import spoon.reflect.declaration.CtElement;
5
6 /**
7  * This interface defines problem fixers. Problem fixers can be provided when a
8  * problem is reported to the environment. The user can then chose what fixer to
9  * use.
10  *
11  * @see Environment#report(Processor, Severity, CtElement, String,
12  * ProblemFixer[])
13  */

14 public interface ProblemFixer<T extends CtElement> extends FactoryAccessor {
15
16     /**
17      * Returns the description of this fixer
18      */

19     public abstract String JavaDoc getDescription();
20
21     /**
22      * Returns a short String that represent this fixer.
23      */

24     public abstract String JavaDoc getLabel();
25
26     /**
27      * Runs this fix on given element. This fixer should modify the given model
28      * and return a list of the modified elements.
29      *
30      * @param element
31      * the element marked by a problem
32      * @return List of modified elements
33      */

34     public abstract Changes run(T element);
35 }
36
Popular Tags