Serializablepublic class JavaClassContext extends Object implements Serializable
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.| Constructor | Description |
|---|---|
JavaClassContext() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(JavaClass javaClass) |
Store this
JavaClass based on its fully qualified name |
void |
add(JavaPackage jPackage) |
A null-safe implementation to store a
JavaPackage in this context |
void |
add(JavaSource source) |
Store a
JavaSource in this context |
JavaClass |
getClassByName(String name) |
Retrieve the
JavaClass based on the name. |
List<JavaClass> |
getClasses() |
Return all stored JavaClasses
|
JavaPackage |
getPackageByName(String name) |
Retrieve the
JavaPackage based on the name. |
List<JavaPackage> |
getPackages() |
Return all stored JavaPackages
|
List<JavaSource> |
getSources() |
Return all stored JavaSources
|
JavaClass |
removeClassByName(String name) |
Remove and return the
JavaClass based on the name. |
JavaPackage |
removePackageByName(String name) |
Remove and return the
JavaPackage based on the name. |
public JavaClass getClassByName(String name)
JavaClass based on the name.name - the fully qualified name of the classnullpublic JavaClass removeClassByName(String name)
JavaClass based on the name.name - the fully qualified name of the classnullpublic List<JavaClass> getClasses()
nullpublic void add(JavaClass javaClass)
JavaClass based on its fully qualified namejavaClass - the JavaClass to addpublic JavaPackage getPackageByName(String name)
JavaPackage based on the name.name - the fully qualified name of the packagenullpublic JavaPackage removePackageByName(String name)
JavaPackage based on the name.name - the fully qualified name of the classnullpublic void add(JavaPackage jPackage)
JavaPackage in this contextjPackage - the JavaPackage to addpublic List<JavaPackage> getPackages()
nullpublic void add(JavaSource source)
JavaSource in this contextsource - the JavaSource to addpublic List<JavaSource> getSources()
nullCopyright © 2002–2018. All rights reserved.