29 import java.net.URI; |
29 import java.net.URI; |
30 import java.util.Set; |
30 import java.util.Set; |
31 import java.util.Map; |
31 import java.util.Map; |
32 |
32 |
33 import com.sun.tools.sjavac.options.Options; |
33 import com.sun.tools.sjavac.options.Options; |
34 import com.sun.tools.sjavac.server.JavacService; |
34 import com.sun.tools.sjavac.server.Sjavac; |
35 |
35 |
36 /** |
36 /** |
37 * The transform interface is used to transform content inside a package, from one form to another. |
37 * The transform interface is used to transform content inside a package, from one form to another. |
38 * Usually the output form is an unpredictable number of output files. (eg class files) |
38 * Usually the output form is an unpredictable number of output files. (eg class files) |
39 * but can also be an unpredictable number of generated source files (eg idl2java) |
39 * but can also be an unpredictable number of generated source files (eg idl2java) |
40 * or a single predictable output file (eg when copying,cleaning or compiling a properties file). |
40 * or a single predictable output file (eg when copying,cleaning or compiling a properties file). |
41 * |
41 * |
42 * <p><b>This is NOT part of any supported API. |
42 * <p><b>This is NOT part of any supported API. |
43 * If you write code that depends on this, you do so at your own |
43 * If you write code that depends on this, you do so at your own risk. |
44 * risk. This code and its internal interfaces are subject to change |
44 * This code and its internal interfaces are subject to change or |
45 * or deletion without notice.</b></p> |
45 * deletion without notice.</b> |
46 */ |
46 */ |
47 public interface Transformer |
47 public interface Transformer { |
48 { |
|
49 /** |
48 /** |
50 * The transform method takes a set of package names, mapped to their source files and to the |
49 * The transform method takes a set of package names, mapped to their source files and to the |
51 * pubapis of the packages. |
50 * pubapis of the packages. |
52 * |
51 * |
53 * The transform implementation must: |
52 * The transform implementation must: |
81 * I.e. something was printed on stderr. |
80 * I.e. something was printed on stderr. |
82 * |
81 * |
83 * If num_cores is set to a non-zero value. The transform should attempt to use no more than these |
82 * If num_cores is set to a non-zero value. The transform should attempt to use no more than these |
84 * number of threads for heavy work. |
83 * number of threads for heavy work. |
85 */ |
84 */ |
86 boolean transform(JavacService javacService, |
85 boolean transform(Sjavac sjavac, |
87 Map<String,Set<URI>> pkgSrcs, |
86 Map<String,Set<URI>> pkgSrcs, |
88 Set<URI> visibleSources, |
87 Set<URI> visibleSources, |
89 Map<URI,Set<String>> visibleClasses, |
88 Map<URI,Set<String>> visibleClasses, |
90 Map<String,Set<String>> oldPackageDependencies, |
89 Map<String,Set<String>> oldPackageDependencies, |
91 URI destRoot, |
90 URI destRoot, |