java.lang.Object
com.thoughtworks.qdox.library.OrderedClassLibraryBuilder
- 所有已实现的接口:
ClassLibraryBuilder,Serializable
This library resolves JavaClasses in the order in which class sources are added.
- 从以下版本开始:
- 2.0
- 作者:
- Robert Scholte
- 另请参阅:
-
构造器概要
构造器构造器说明Default constructor which sets the root classLibrary to ClassNameLibrary.OrderedClassLibraryBuilder(AbstractClassLibrary rootClassLibrary) Constructor for which you can set the root ClassLibrary If you set this to null, all classes should be available on the classpath. -
方法概要
修饰符和类型方法说明addSource(InputStream stream) Add the source content of the reader to the ClassLibrary and return the generated JavaSourceaddSourceFolder(File sourceFolder) appendClassLoader(ClassLoader classLoader) Append a classloader and return itselfAdd the defaultClassLoaders and return itseappendSource(File file) appendSource(InputStream stream) appendSource(Reader reader) appendSource(URL url) appendSourceFolder(File sourceFolder) Get the library based on the strategy of the implementationprotected final SourceLibraryprotected ClassLoaderLibrarynewClassLoaderLibrary(AbstractClassLibrary parentLibrary) Ability to override the implementation of ClassLoaderLibraryprotected SourceFolderLibrarynewSourceFolderLibrary(AbstractClassLibrary parentLibrary) Ability to override the implementation of SourceFolderLibraryprotected SourceLibrarynewSourceLibrary(AbstractClassLibrary parentLibrary) Ability to override the implementation of SourceLibrarysetDebugLexer(boolean debugLexer) Set totrueto enable debug logging for the lexersetDebugParser(boolean debugParser) Set totrueto enable debug logging for the parsersetEncoding(String encoding) setErrorHander(ErrorHandler errorHandler) Can handle ParseExceptions instead of crashing.setModelBuilderFactory(ModelBuilderFactory modelBuilderFactory) Define theModelBuilderFactorywhich the parsers should use to construct the JavaModel ObjectssetModelWriterFactory(ModelWriterFactory modelWriterFactory) Define theModelWriterFactorywhich is used by the classes when calling for the codeBlock.
-
构造器详细资料
-
OrderedClassLibraryBuilder
public OrderedClassLibraryBuilder()Default constructor which sets the root classLibrary to ClassNameLibrary. This way every class will be resolved, even if it's not on the classpath. -
OrderedClassLibraryBuilder
Constructor for which you can set the root ClassLibrary If you set this to null, all classes should be available on the classpath.- 参数:
rootClassLibrary- the parent Classlibrary
-
-
方法详细资料
-
appendClassLoader
从接口复制的说明:ClassLibraryBuilderAppend a classloader and return itself- 指定者:
appendClassLoader在接口中ClassLibraryBuilder- 参数:
classLoader- the classloader to add- 返回:
- this ClassLibraryBuilder instance
-
appendDefaultClassLoaders
从接口复制的说明:ClassLibraryBuilderAdd the defaultClassLoaders and return itse- 指定者:
appendDefaultClassLoaders在接口中ClassLibraryBuilder- 返回:
- this ClassLibraryBuilder instance
-
appendSourceFolder
- 指定者:
appendSourceFolder在接口中ClassLibraryBuilder- 参数:
sourceFolder- the source folder- 返回:
- this ClassLibraryBuilder instance
-
appendSource
- 指定者:
appendSource在接口中ClassLibraryBuilder- 参数:
stream- the Java source as stream- 返回:
- this ClassLibraryBuilder instance
- 抛出:
IOException- if an IOException is thrown, e.g. unsupported encoding
-
appendSource
- 指定者:
appendSource在接口中ClassLibraryBuilder- 参数:
reader- the Java source as reader- 返回:
- this ClassLibraryBuilder instance
-
setDebugLexer
从接口复制的说明:ClassLibraryBuilderSet totrueto enable debug logging for the lexer- 指定者:
setDebugLexer在接口中ClassLibraryBuilder- 参数:
debugLexer- the debug logging flag- 返回:
- this ClassLibraryBuilder instance
-
setDebugParser
从接口复制的说明:ClassLibraryBuilderSet totrueto enable debug logging for the parser- 指定者:
setDebugParser在接口中ClassLibraryBuilder- 参数:
debugParser- the debug logging flag- 返回:
- this ClassLibraryBuilder instance
-
setEncoding
- 指定者:
setEncoding在接口中ClassLibraryBuilder- 参数:
encoding- set the encoding- 返回:
- this ClassLibraryBuilder instance
-
setErrorHander
从接口复制的说明:ClassLibraryBuilderCan handle ParseExceptions instead of crashing. Has only effect on the appendSource() methods- 指定者:
setErrorHander在接口中ClassLibraryBuilder- 参数:
errorHandler- the errorHandler- 返回:
- this ClassLibraryBuilder instance
-
setModelBuilderFactory
从接口复制的说明:ClassLibraryBuilderDefine theModelBuilderFactorywhich the parsers should use to construct the JavaModel Objects- 指定者:
setModelBuilderFactory在接口中ClassLibraryBuilder- 参数:
modelBuilderFactory- the modelBuilderFactory- 返回:
- this ClassLibraryBuilder instance
-
setModelWriterFactory
从接口复制的说明:ClassLibraryBuilderDefine theModelWriterFactorywhich is used by the classes when calling for the codeBlock.- 指定者:
setModelWriterFactory在接口中ClassLibraryBuilder- 参数:
modelWriterFactory- the modelWriterFactory- 返回:
- this ClassLibraryBuilder instance
-
getClassLibrary
从接口复制的说明:ClassLibraryBuilderGet the library based on the strategy of the implementation- 指定者:
getClassLibrary在接口中ClassLibraryBuilder- 返回:
- the constructed ClassLibrary
-
appendSource
- 指定者:
appendSource在接口中ClassLibraryBuilder- 参数:
url- the Java source as URL- 返回:
- this ClassLibraryBuilder instance
- 抛出:
IOException- if an IOException occurs
-
appendSource
- 指定者:
appendSource在接口中ClassLibraryBuilder- 参数:
file- the Java source as file- 返回:
- this ClassLibraryBuilder instance
- 抛出:
IOException- if an IOException occurs
-
addSource
- 指定者:
addSource在接口中ClassLibraryBuilder- 参数:
stream- the Java source as stream- 返回:
- the created JavaSource
- 抛出:
IOException- if an IOException is thrown, e.g. unsupported encoding
-
addSource
从接口复制的说明:ClassLibraryBuilderAdd the source content of the reader to the ClassLibrary and return the generated JavaSource- 指定者:
addSource在接口中ClassLibraryBuilder- 参数:
reader- the Java source as reader- 返回:
- the created JavaSource
-
addSource
- 指定者:
addSource在接口中ClassLibraryBuilder- 参数:
url- the Java source as URL- 返回:
- the created JavaSource
- 抛出:
IOException- if an IOException occurs
-
addSource
- 指定者:
addSource在接口中ClassLibraryBuilder- 参数:
file- the Java source as file- 返回:
- the created JavaSource
- 抛出:
IOException- if an IOException occurs
-
addSourceFolder
- 指定者:
addSourceFolder在接口中ClassLibraryBuilder- 参数:
sourceFolder- the sourcefolder- 返回:
- the module info if the sourcefolder has a module-info.java, otherwise
null
-
getSourceLibrary
-
newClassLoaderLibrary
Ability to override the implementation of ClassLoaderLibrary- 参数:
parentLibrary- the parent library- 返回:
- a new ClassLoaderLibrary instance
- 从以下版本开始:
- 2.0
-
newSourceLibrary
Ability to override the implementation of SourceLibrary- 参数:
parentLibrary- the parent library- 返回:
- a new SourceLibrary instance
- 从以下版本开始:
- 2.0
-
newSourceFolderLibrary
Ability to override the implementation of SourceFolderLibrary- 参数:
parentLibrary- the parent library- 返回:
- a new SourceFolderLibrary instance
- 从以下版本开始:
- 2.0
-