Class JavaClassContext
java.lang.Object
com.thoughtworks.qdox.library.JavaClassContext
- All Implemented Interfaces:
Serializable
JavaClassContext gives you a mechanism to get a
JavaClass.
If a class couldn't be found in the cache, the class will be pulled from the classLibrary, the builder will create the corresponding JavaClass and put it in the cache.- Author:
- Robert Scholte
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStore thisJavaClassbased on its fully qualified namevoidadd(JavaPackage jPackage) A null-safe implementation to store aJavaPackagein this contextvoidadd(JavaSource source) Store aJavaSourcein this contextgetClassByName(String name) Retrieve theJavaClassbased on thename.Return all stored JavaClassesgetPackageByName(String name) Retrieve theJavaPackagebased on thename.Return all stored JavaPackagesReturn all stored JavaSourcesremoveClassByName(String name) Remove and return theJavaClassbased on thename.removePackageByName(String name) Remove and return theJavaPackagebased on thename.
-
Constructor Details
-
JavaClassContext
public JavaClassContext()
-
-
Method Details
-
getClassByName
-
removeClassByName
-
getClasses
-
add
-
getPackageByName
Retrieve theJavaPackagebased on thename.- Parameters:
name- the fully qualified name of the package- Returns:
- the stored JavaPackage, otherwise
null
-
removePackageByName
Remove and return theJavaPackagebased on thename.- Parameters:
name- the fully qualified name of the class- Returns:
- the removed JavaPackage, otherwise
null
-
add
A null-safe implementation to store aJavaPackagein this context- Parameters:
jPackage- the JavaPackage to add
-
getPackages
Return all stored JavaPackages- Returns:
- a list of JavaPackages, never
null
-
add
Store aJavaSourcein this context- Parameters:
source- the JavaSource to add
-
getSources
Return all stored JavaSources- Returns:
- a list of JavaSources, never
null
-