| spoon.processing.Builder
All known Subclasses: spoon.support.builder.SpoonBuildingManager,
Builder | public interface Builder extends FactoryAccessor(Code) | | This interface defines the API to build a Spoon meta-model from input sources
given as files. You should add your sources, and use
Builder.build() to create the Spoon meta-model. Once the meta-model is built and stored in
the factory, it can be processed by using a
spoon.processing.ProcessingManager . As an example of use, take a
look at the
spoon.Launcher implementation.
|
addInputSource | void addInputSource(File source) throws IOException(Code) | | Adds a file/directory to be built. By default, the files could be Java
source files or Jar files. Directories are processed recursively.
Parameters: source - file or directory to add |
addInputSource | void addInputSource(CtResource source) throws IOException(Code) | | Adds a file/directory (as a CtResource) to be built. By default, the
files could be Java source files or Jar files. Directories are processed
recursively.
Parameters: source - file or directory to add |
addTemplateSource | void addTemplateSource(File source) throws IOException(Code) | | Adds a file/directory to be used to build templates. By default, the
files should be Java source files or Jar files containing the sources.
Directories are processed recursively. Templates are set apart from the
program to be processed for logical reasons. However, if a template was
needed to be processed, it could be added as an input source.
Parameters: source - file or directory to add |
addTemplateSource | void addTemplateSource(CtResource source) throws IOException(Code) | | Adds a file/directory (as a CtResource) to be used to build templates. By
default, the files should be Java source files or Jar files containing
the sources. Directories are processed recursively. Templates are set
apart from the program to be processed for logical reasons. However, if a
template was needed to be processed, it could be added as an input
source.
Parameters: source - file or directory to add |
build | boolean build() throws Exception(Code) | | Builds the program's model with the current factory and stores the result
into this factory. Note that this method can only be used once on a given
factory. If more attempts are made, it throws an exception.
true if the Java was successfully compiled with the core Javacompiler, false if some errors were encountered while compiling exception: Exception - when a building problem occurs |
getProblems | List<String> getProblems()(Code) | | Gets the list of problems that may have been reported by the compiler
when building the model.
|
initCompiler | void initCompiler()(Code) | | This method should be called before starting the compilation in order to
perform plateform specific initializations. Override the method in
subclasses do add new initializations.
|
|
|