public class SortedClassLibraryBuilder extends java.lang.Object implements ClassLibraryBuilder
| Constructor and Description |
|---|
SortedClassLibraryBuilder() |
| Modifier and Type | Method and Description |
|---|---|
JavaSource |
addSource(java.io.File file) |
JavaSource |
addSource(java.io.InputStream stream) |
JavaSource |
addSource(java.io.Reader reader)
Add the source content of the reader to the ClassLibrary and return the generated JavaSource
|
JavaSource |
addSource(java.net.URL url) |
JavaModule |
addSourceFolder(java.io.File sourceFolder) |
ClassLibraryBuilder |
appendClassLoader(java.lang.ClassLoader classLoader)
Append a classloader and return itself
|
ClassLibraryBuilder |
appendDefaultClassLoaders()
Add the defaultClassLoaders and return itse
|
ClassLibraryBuilder |
appendSource(java.io.File file) |
ClassLibraryBuilder |
appendSource(java.io.InputStream stream) |
ClassLibraryBuilder |
appendSource(java.io.Reader reader) |
ClassLibraryBuilder |
appendSource(java.net.URL url) |
ClassLibraryBuilder |
appendSourceFolder(java.io.File sourceFolder) |
ClassLibrary |
getClassLibrary()
Get the library based on the strategy of the implementation
|
ClassLibraryBuilder |
setDebugLexer(boolean debugLexer)
Set to
true to enable debug logging for the lexer |
ClassLibraryBuilder |
setDebugParser(boolean debugParser)
Set to
true to enable debug logging for the parser |
ClassLibraryBuilder |
setEncoding(java.lang.String encoding) |
ClassLibraryBuilder |
setErrorHander(ErrorHandler errorHandler)
Can handle ParseExceptions instead of crashing.
|
ClassLibraryBuilder |
setModelBuilderFactory(ModelBuilderFactory factory)
Define the
ModelBuilderFactory which the parsers should use to construct the JavaModel Objects |
ClassLibraryBuilder |
setModelWriterFactory(ModelWriterFactory modelWriterFactory)
Define the
ModelWriterFactory which is used by the classes when calling for the codeBlock. |
public ClassLibraryBuilder appendClassLoader(java.lang.ClassLoader classLoader)
ClassLibraryBuilderappendClassLoader in interface ClassLibraryBuilderclassLoader - the classloader to addpublic ClassLibraryBuilder appendDefaultClassLoaders()
ClassLibraryBuilderappendDefaultClassLoaders in interface ClassLibraryBuilderpublic ClassLibraryBuilder appendSourceFolder(java.io.File sourceFolder)
appendSourceFolder in interface ClassLibraryBuildersourceFolder - the source folderpublic ClassLibraryBuilder appendSource(java.io.InputStream stream) throws java.io.IOException
appendSource in interface ClassLibraryBuilderstream - the Java source as streamjava.io.IOException - if an IOException is thrown, e.g. unsupported encodingpublic ClassLibraryBuilder appendSource(java.io.Reader reader)
appendSource in interface ClassLibraryBuilderreader - the Java source as readerpublic ClassLibraryBuilder appendSource(java.net.URL url) throws java.io.IOException
appendSource in interface ClassLibraryBuilderurl - the Java source as URLjava.io.IOException - if an IOException occurspublic ClassLibraryBuilder appendSource(java.io.File file) throws java.io.IOException
appendSource in interface ClassLibraryBuilderfile - the Java source as filejava.io.IOException - if an IOException occurspublic ClassLibraryBuilder setDebugLexer(boolean debugLexer)
ClassLibraryBuildertrue to enable debug logging for the lexersetDebugLexer in interface ClassLibraryBuilderdebugLexer - the debug logging flagpublic ClassLibraryBuilder setDebugParser(boolean debugParser)
ClassLibraryBuildertrue to enable debug logging for the parsersetDebugParser in interface ClassLibraryBuilderdebugParser - the debug logging flagpublic ClassLibraryBuilder setEncoding(java.lang.String encoding)
setEncoding in interface ClassLibraryBuilderencoding - set the encodingpublic ClassLibraryBuilder setErrorHander(ErrorHandler errorHandler)
ClassLibraryBuildersetErrorHander in interface ClassLibraryBuildererrorHandler - the errorHandlerpublic ClassLibraryBuilder setModelBuilderFactory(ModelBuilderFactory factory)
ClassLibraryBuilderModelBuilderFactory which the parsers should use to construct the JavaModel ObjectssetModelBuilderFactory in interface ClassLibraryBuilderfactory - the modelBuilderFactorypublic ClassLibraryBuilder setModelWriterFactory(ModelWriterFactory modelWriterFactory)
ClassLibraryBuilderModelWriterFactory which is used by the classes when calling for the codeBlock.setModelWriterFactory in interface ClassLibraryBuildermodelWriterFactory - the modelWriterFactorypublic ClassLibrary getClassLibrary()
ClassLibraryBuildergetClassLibrary in interface ClassLibraryBuilderpublic JavaSource addSource(java.io.InputStream stream) throws java.io.IOException
addSource in interface ClassLibraryBuilderstream - the Java source as streamjava.io.IOException - if an IOException is thrown, e.g. unsupported encodingpublic JavaSource addSource(java.io.Reader reader)
ClassLibraryBuilderaddSource in interface ClassLibraryBuilderreader - the Java source as readerpublic JavaSource addSource(java.net.URL url) throws java.io.IOException
addSource in interface ClassLibraryBuilderurl - the Java source as URLjava.io.IOException - if an IOException occurspublic JavaSource addSource(java.io.File file) throws java.io.IOException
addSource in interface ClassLibraryBuilderfile - the Java source as filejava.io.IOException - if an IOException occurspublic JavaModule addSourceFolder(java.io.File sourceFolder)
addSourceFolder in interface ClassLibraryBuildersourceFolder - the sourcefoldernullCopyright © 2002-2018. All Rights Reserved.