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
Fields inherited from class spoon.support.compiler.jdt.JDTBasedSpoonCompiler
compilationUnitFilters, environment, factory, javaCompliance, probs, requestor, sources, templateClasspath, templates
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
build()
Builds the program's model with this compiler's factory and stores the result into this factory.boolean
build(JDTBuilder builder)
Builds the program's model with this compiler's factory and stores the result into this factory.protected boolean
buildSources(JDTBuilder jdtBuilder)
protected void
report(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:SpoonModelBuilder
Builds 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:
build
in interfaceSpoonModelBuilder
- Overrides:
build
in 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:SpoonModelBuilder
Builds 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:
build
in interfaceSpoonModelBuilder
- Overrides:
build
in 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:
buildSources
in classJDTBasedSpoonCompiler
-
report
protected void report(Environment environment, org.eclipse.jdt.core.compiler.CategorizedProblem problem)- Overrides:
report
in classJDTBasedSpoonCompiler
-
getSnippetCompilationUnit
- Returns:
- CompilationUnit which was produced by compiling of this snippet
-