java.lang.Object
com.thoughtworks.qdox.model.impl.DefaultJavaSource
- 所有已实现的接口:
JavaSource,Serializable
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidvoidgetClassByName(String name) Try to get any class of this source by name.A List with all direct classes of this source, nevernullIf there's a package, return the packageName, followed by a dot, otherwise an empty StringComplete code representation of this sourceRetrieve all the importgetNestedClassByName(String name) Try to get the JavaClass child based on its name relative to the package.The package of this source ornullReturns the name of the package or an empty String if there's no packagegetURL()voidsetModelWriterFactory(ModelWriterFactory modelWriterFactory) voidsetPackage(JavaPackage pkg) voidtoString()
-
构造器详细资料
-
DefaultJavaSource
Default constructor for the Default JavaSource- 参数:
classLibrary- the classLibrary, should not benull
-
-
方法详细资料
-
setURL
- 参数:
url- the URL of the source file- 从以下版本开始:
- 1.4
-
getURL
- 指定者:
getURL在接口中JavaSource- 返回:
- the URL of the source file
-
getPackage
The package of this source ornull- 指定者:
getPackage在接口中JavaSource- 返回:
- the package
-
setPackage
-
addImport
-
getImports
Retrieve all the import- 指定者:
getImports在接口中JavaSource- 返回:
- the imports, never
null
-
addClass
-
getClasses
A List with all direct classes of this source, nevernull- 指定者:
getClasses在接口中JavaSource- 返回:
- a list of JavaClasses, never
null
-
getCodeBlock
Complete code representation of this source- 指定者:
getCodeBlock在接口中JavaSource- 返回:
- the code block of this source
-
toString
-
getClassNamePrefix
If there's a package, return the packageName, followed by a dot, otherwise an empty String- 指定者:
getClassNamePrefix在接口中JavaSource- 返回:
- the class name prefix, otherwise an empty String
-
getNestedClassByName
Try to get the JavaClass child based on its name relative to the package. This doesn't try to resolve it by recursion.- 指定者:
getNestedClassByName在接口中JavaSource- 参数:
name- the name of the class- 返回:
- the resolved JavaClass, otherwise
null
-
getClassByName
Try to get any class of this source by name. The name can be both the fully qualified name or just the name of the class.- 指定者:
getClassByName在接口中JavaSource- 参数:
name- the (fully qualified) name of the class- 返回:
- the matching class, otherwise
null
-
getJavaClassLibrary
- 指定者:
getJavaClassLibrary在接口中JavaSource
-
getPackageName
Returns the name of the package or an empty String if there's no package- 指定者:
getPackageName在接口中JavaSource- 返回:
- the package name, otherwise an empty String
-
setModelWriterFactory
- 参数:
modelWriterFactory- the modelWriterFactory- 从以下版本开始:
- 2.0
-