Package spoon.support.compiler.jdt
Class JDTSnippetCompiler
java.lang.Object
spoon.support.compiler.jdt.JDTBasedSpoonCompiler
spoon.support.compiler.jdt.JDTSnippetCompiler
- All Implemented Interfaces:
SpoonModelBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from interface spoon.SpoonModelBuilder
SpoonModelBuilder.InputType -
Field Summary
FieldsFields inherited from class spoon.support.compiler.jdt.JDTBasedSpoonCompiler
compilationUnitFilters, environment, factory, javaCompliance, probs, requestor, sources, templateClasspath, templates -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbuild()Builds the program's model with this compiler's factory and stores the result into this factory.booleanbuild(JDTBuilder builder)Builds the program's model with this compiler's factory and stores the result into this factory.protected booleanbuildSources(JDTBuilder jdtBuilder)protected voidreport(Environment environment, org.eclipse.jdt.core.compiler.CategorizedProblem problem)Methods inherited from class spoon.support.compiler.jdt.JDTBasedSpoonCompiler
addCompilationUnitFilter, addInputSource, addInputSource, addInputSources, addTemplateSource, addTemplateSource, addTemplateSources, buildModel, buildTemplates, buildUnits, buildUnitsAndModel, compile, createBatchCompiler, createBatchCompiler, generateProcessedSourceFiles, generateProcessedSourceFiles, generateProcessedSourceFilesUsingCUs, generateProcessedSourceFilesUsingTypes, getBinaryOutputDirectory, getCompilationUnitFilter, getCompilationUnitInputStream, getEnvironment, getFactory, getInputSources, getProblems, getSource, getSourceClasspath, getSourceOutputDirectory, getTemplateClasspath, getTemplates, getTemplateSources, instantiateAndProcess, process, removeCompilationUnitFilter, reportProblem, reportProblems, reportProblemsWhenCompiling, setBinaryOutputDirectory, setEnvironment, setSourceClasspath, setTemplateClasspath, sortCompilationUnits, traverseUnitDeclaration
-
Field Details
-
SNIPPET_FILENAME_PREFIX
-
-
Constructor Details
-
JDTSnippetCompiler
-
-
Method Details
-
build
public boolean build()Description copied from interface:SpoonModelBuilderBuilds the program's model with this compiler's factory and stores the result into this factory. Note that this method should only be used once on a given factory.- Specified by:
buildin interfaceSpoonModelBuilder- Overrides:
buildin classJDTBasedSpoonCompiler- Returns:
- true if the Java was successfully compiled with the core Java compiler, false if some errors were encountered while compiling
- See Also:
SpoonModelBuilder.getSourceClasspath(),SpoonModelBuilder.getTemplateClasspath()
-
build
Description copied from interface:SpoonModelBuilderBuilds the program's model with this compiler's factory and stores the result into this factory. Note that this method should only be used once on a given factory.- Specified by:
buildin interfaceSpoonModelBuilder- Overrides:
buildin classJDTBasedSpoonCompiler- Parameters:
builder- Parameters given at JDT compiler.- Returns:
- true if the Java was successfully compiled with the core Java compiler, false if some errors were encountered while compiling
- See Also:
SpoonModelBuilder.getSourceClasspath(),SpoonModelBuilder.getTemplateClasspath()
-
buildSources
- Overrides:
buildSourcesin classJDTBasedSpoonCompiler
-
report
protected void report(Environment environment, org.eclipse.jdt.core.compiler.CategorizedProblem problem)- Overrides:
reportin classJDTBasedSpoonCompiler
-
getSnippetCompilationUnit
- Returns:
- CompilationUnit which was produced by compiling of this snippet
-