public interface ClassLibraryBuilder extends Serializable
SortedClassLibraryBuilder bundles all classloaders, all sourcefolders and all sources.
The OrderedClassLibraryBuilder on the other hand keeps track of the order in which sourcetypes are added.| Modifier and Type | Method and Description |
|---|---|
JavaSource |
addSource(File file) |
JavaSource |
addSource(InputStream stream) |
JavaSource |
addSource(Reader reader)
Add the source content of the reader to the ClassLibrary and return the generated JavaSource
|
JavaSource |
addSource(URL url) |
JavaModule |
addSourceFolder(File sourceFolder) |
ClassLibraryBuilder |
appendClassLoader(ClassLoader classLoader)
Append a classloader and return itself
|
ClassLibraryBuilder |
appendDefaultClassLoaders()
Add the defaultClassLoaders and return itse
|
ClassLibraryBuilder |
appendSource(File file) |
ClassLibraryBuilder |
appendSource(InputStream stream) |
ClassLibraryBuilder |
appendSource(Reader reader) |
ClassLibraryBuilder |
appendSource(URL url) |
ClassLibraryBuilder |
appendSourceFolder(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(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 factory)
Define the
ModelWriterFactory which is used by the classes when calling for the codeBlock. |
ClassLibraryBuilder appendClassLoader(ClassLoader classLoader)
classLoader - the classloader to addClassLibraryBuilder appendDefaultClassLoaders()
ClassLibraryBuilder appendSourceFolder(File sourceFolder)
sourceFolder - the source folderClassLibraryBuilder appendSource(InputStream stream) throws IOException
stream - the Java source as streamIOException - if an IOException is thrown, e.g. unsupported encodingClassLibraryBuilder appendSource(Reader reader)
reader - the Java source as readerClassLibraryBuilder appendSource(URL url) throws IOException
url - the Java source as URLIOException - if an IOException occursClassLibraryBuilder appendSource(File file) throws IOException
file - the Java source as fileIOException - if an IOException occursJavaSource addSource(InputStream stream) throws IOException
stream - the Java source as streamIOException - if an IOException is thrown, e.g. unsupported encodingJavaSource addSource(Reader reader)
reader - the Java source as readerJavaSource addSource(URL url) throws IOException
url - the Java source as URLIOException - if an IOException occursJavaSource addSource(File file) throws IOException
file - the Java source as fileIOException - if an IOException occursClassLibraryBuilder setDebugLexer(boolean debugLexer)
true to enable debug logging for the lexerdebugLexer - the debug logging flagClassLibraryBuilder setDebugParser(boolean debugParser)
true to enable debug logging for the parserdebugParser - the debug logging flagClassLibraryBuilder setEncoding(String encoding)
encoding - set the encodingClassLibraryBuilder setModelBuilderFactory(ModelBuilderFactory factory)
ModelBuilderFactory which the parsers should use to construct the JavaModel Objectsfactory - the modelBuilderFactoryClassLibraryBuilder setModelWriterFactory(ModelWriterFactory factory)
ModelWriterFactory which is used by the classes when calling for the codeBlock.factory - the modelWriterFactoryClassLibrary getClassLibrary()
ClassLibraryBuilder setErrorHander(ErrorHandler errorHandler)
errorHandler - the errorHandlerJavaModule addSourceFolder(File sourceFolder)
sourceFolder - the sourcefoldernullCopyright © 2002–2025. All rights reserved.