Package com.thoughtworks.qdox.library
Interface ClassLibrary
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AbstractClassLibrary
,ClassLoaderLibrary
,ClassNameLibrary
,SourceFolderLibrary
,SourceLibrary
public interface ClassLibrary extends java.io.Serializable
Main methods of a ClassLibrary, which can be used by every Model- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JavaClass
getJavaClass(java.lang.String name)
Get the JavaClass or null if it's not possibleJavaClass
getJavaClass(java.lang.String name, boolean createStub)
Try to retrieve the JavaClass by the (binary) name.java.util.Collection<JavaClass>
getJavaClasses()
Return all JavaClasses of the current library.java.util.Collection<JavaModule>
getJavaModules()
JavaPackage
getJavaPackage(java.lang.String name)
Get the JavaPackage or null if it's not possiblejava.util.Collection<JavaPackage>
getJavaPackages()
Return all JavaPackages of the current library.java.util.Collection<JavaSource>
getJavaSources()
Return all JavaSources of the current library.boolean
hasClassReference(java.lang.String name)
Check if this library holds a reference based on the name.
-
-
-
Method Detail
-
hasClassReference
boolean hasClassReference(java.lang.String name)
Check if this library holds a reference based on the name.- Parameters:
name
- the (binary) name trying to resolve- Returns:
- true if the classLibrary has a reference, otherwise
false
-
getJavaClass
JavaClass getJavaClass(java.lang.String name)
Get the JavaClass or null if it's not possible- Parameters:
name
- The (binary) name of the JavaClass- Returns:
- the JavaClass, otherwise
null
-
getJavaClass
JavaClass getJavaClass(java.lang.String name, boolean createStub)
Try to retrieve the JavaClass by the (binary) name. If the JavaClss doesn't exist and createStub istrue
make a stub, otherwise returnnull
- Parameters:
name
- the name of the classcreateStub
- force creation of a stub if the class can't be found- Returns:
- the JavaClass, might be
null
depending on the value of createStub.
-
getJavaClasses
java.util.Collection<JavaClass> getJavaClasses()
Return all JavaClasses of the current library. It's up to the library to decide if also collects JavaClasses from it's ancestors- Returns:
- all JavaClasses as a List, never
null
-
getJavaSources
java.util.Collection<JavaSource> getJavaSources()
Return all JavaSources of the current library. It's up to the library to decide if also collects JavaSources from it's ancestors- Returns:
- all JavaSources as a List, never
null
-
getJavaPackage
JavaPackage getJavaPackage(java.lang.String name)
Get the JavaPackage or null if it's not possible- Parameters:
name
- The fully qualified name of the JavaPackage- Returns:
- The package, otherwise
null
-
getJavaPackages
java.util.Collection<JavaPackage> getJavaPackages()
Return all JavaPackages of the current library. It's up to the library to decide if also collects JavaPackages from it's ancestors- Returns:
- all JavaPackages as a List, never
null
-
getJavaModules
java.util.Collection<JavaModule> getJavaModules()
-
-