public 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 and Description |
---|
JavaClassContext() |
Modifier and Type | Method and 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 classnull
public JavaClass removeClassByName(String name)
JavaClass
based on the name
.name
- the fully qualified name of the classnull
public List<JavaClass> getClasses()
null
public 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 packagenull
public JavaPackage removePackageByName(String name)
JavaPackage
based on the name
.name
- the fully qualified name of the classnull
public void add(JavaPackage jPackage)
JavaPackage
in this contextjPackage
- the JavaPackage to addpublic List<JavaPackage> getPackages()
null
public void add(JavaSource source)
JavaSource
in this contextsource
- the JavaSource to addpublic List<JavaSource> getSources()
null
Copyright © 2002–2023. All rights reserved.