01: package spoon.reflect.visitor;
02:
03: import java.util.List;
04: import java.util.Map;
05:
06: import spoon.reflect.cu.CompilationUnit;
07: import spoon.reflect.declaration.CtSimpleType;
08:
09: /**
10: * This interface defines the pretty printers.
11: */
12: public interface PrettyPrinter {
13:
14: /**
15: * Gets the package declaration contents.
16: */
17: String getPackageDeclaration();
18:
19: /**
20: * Gets the contents of the compilation unit.
21: */
22: StringBuffer getResult();
23:
24: /**
25: * Calculates the resulting source file for a list of types. The source
26: * compilation unit is required for calculating the line numbers mapping.
27: */
28: void calculate(CompilationUnit sourceCompilationUnit,
29: List<CtSimpleType<?>> types);
30:
31: /**
32: * Gets the line number mapping between the generated code and the original
33: * code.
34: */
35: Map<Integer, Integer> getLineNumberMapping();
36:
37: }
|