public class PackageMapNode
extends java.lang.Object
Strings to either
Maps or ClassFiles (which are lazily created and
may be null). At each level of the nested map, the string
key is a package name iff its corresponding value is a Map.
Examine that Map's contents to explore the contents of
that package. If the corresponding value is a ClassFile,
then the string key's value is the name of that class. Finally, if
the corresponding value is null, then the string key's
value is the name of a class, but its contents have not yet been
loaded for use by the code completion library (ClassFiles
are lazily loaded to conserve memory).| Constructor and Description |
|---|
PackageMapNode() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String className)
Adds entries for a fully-qualified class name, of the form
"org/fife/util/DynamicIntArray.class". |
void |
addCompletions(LibraryInfo info,
org.fife.ui.autocomplete.CompletionProvider provider,
java.lang.String[] pkgNames,
java.util.Set<org.fife.ui.autocomplete.Completion> addTo)
Gets the completions in this package map that match a given string.
|
int |
clearClassFiles()
Removes the cache of all
ClassFiles from this package
map. |
boolean |
containsClass(java.lang.String className)
Returns whether this package map node contains a class.
|
boolean |
containsPackage(java.lang.String pkgName)
Returns whether this package map node contains a package.
|
ClassFile |
getClassEntry(LibraryInfo info,
java.lang.String[] items)
Returns a class entry.
|
void |
getClassesInPackage(LibraryInfo info,
java.util.List<ClassFile> addTo,
java.lang.String[] pkgs,
boolean inPkg)
Returns the classes in a package.
|
public void add(java.lang.String className)
"org/fife/util/DynamicIntArray.class". This method should
only be called on the "root" node of a package map.className - A fully-qualified class name of the form described
above.public void addCompletions(LibraryInfo info, org.fife.ui.autocomplete.CompletionProvider provider, java.lang.String[] pkgNames, java.util.Set<org.fife.ui.autocomplete.Completion> addTo)
info - The library info.provider - The parent completion provider.pkgNames - The text to match, split into tokens around the
'.' character. This should be (the start of) a
fully-qualified class, interface, or enum name.addTo - The list to add completion choices to.public int clearClassFiles()
ClassFiles from this package
map.public boolean containsClass(java.lang.String className)
className - The class name to check.public boolean containsPackage(java.lang.String pkgName)
pkgName - The package to check.public ClassFile getClassEntry(LibraryInfo info, java.lang.String[] items)
info - The library info.items - The set of items (?).public void getClassesInPackage(LibraryInfo info, java.util.List<ClassFile> addTo, java.lang.String[] pkgs, boolean inPkg)
info - The library info.addTo - The collection to add to.pkgs - The current set of packages.inPkg - Whether to be in the package (?).