java.io.Serializable
public class JavaClassContext
extends java.lang.Object
implements java.io.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(java.lang.String name) |
Retrieve the
JavaClass based on the name . |
java.util.List<JavaClass> |
getClasses() |
Return all stored JavaClasses
|
JavaPackage |
getPackageByName(java.lang.String name) |
Retrieve the
JavaPackage based on the name . |
java.util.List<JavaPackage> |
getPackages() |
Return all stored JavaPackages
|
java.util.List<JavaSource> |
getSources() |
Return all stored JavaSources
|
JavaClass |
removeClassByName(java.lang.String name) |
Remove and return the
JavaClass based on the name . |
JavaPackage |
removePackageByName(java.lang.String name) |
Remove and return the
JavaPackage based on the name . |
public JavaClass getClassByName(java.lang.String name)
JavaClass
based on the name
.name
- the fully qualified name of the classnull
public JavaClass removeClassByName(java.lang.String name)
JavaClass
based on the name
.name
- the fully qualified name of the classnull
public java.util.List<JavaClass> getClasses()
null
public void add(JavaClass javaClass)
JavaClass
based on its fully qualified namejavaClass
- the JavaClass to addpublic JavaPackage getPackageByName(java.lang.String name)
JavaPackage
based on the name
.name
- the fully qualified name of the packagenull
public JavaPackage removePackageByName(java.lang.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 java.util.List<JavaPackage> getPackages()
null
public void add(JavaSource source)
JavaSource
in this contextsource
- the JavaSource to addpublic java.util.List<JavaSource> getSources()
null
Copyright © 2002–2018. All rights reserved.