Extension SDK 9.0.5

oracle.jdeveloper.jot
Interface JotClassDatabase

All Superinterfaces:
Subject
All Known Subinterfaces:
JotManipulations, JotModel, JotWorkArea
All Known Implementing Classes:
JotManager

public interface JotClassDatabase
extends Subject

The JotClassDatabase represents a group of compilation units, and/or sub-JotClassDatabases. It contains retrieval methods that operate within this database's classpath or sourcepath scope. A class database is coupled with a JotWorkArea. The database attempts to remain nearly up to date, and maintain total knowledge of the contents of the paths.

Implements the subject interface. Observers will be sent an UpdateMessage.UpdateMessage.STRUCTURE_CHANGED in all cases. This UpdateMessage will contain an instance of a JotWorkAreaUpdate which will provide the listener with alternate interfaces to retrieve information about the update. This interface is not intended to be implemented by clients.


Field Summary
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Method Summary
 java.util.Iterator getAllClassDescriptors()
           
 java.util.Iterator getAllClassDescriptors(java.lang.String beginsWith, boolean ignoreCase)
           
 JotClass getClass(java.lang.String className, int needs)
          Retrieves the JotClass for a specific class.
 java.util.Iterator getClassList(java.lang.String pkgName, int needs)
          Retrieves a list of classes available in a package
 java.util.Iterator getClassNameList(java.lang.String pkgName, int needs)
          Retrieves a list of classes available in a package
 JotTypeInfo getJotTypeInfo(java.lang.String className, int needs)
          Returns a JotTypeInfo instance for the given classname.
 java.lang.String getPackage(JotFile importContext, java.lang.String className)
          Retrieves a string representation of apackage containing a given class, based on a specific import context.
 java.util.Iterator getPackageList(int needs)
          Retrieves a list of packages available under the configuration associated with this JotManager instance.
 java.util.Iterator getPackages(java.lang.String base, int needs)
          Retrieves a list of strings representing sub-packages located under a specific package.
 JotType getType(java.lang.String classname)
          Retrieves the JotType for a class.
 
Methods inherited from interface oracle.ide.addin.Subject
attach, detach, notifyObservers
 

Method Detail

getClass

public JotClass getClass(java.lang.String className,
                         int needs)
Retrieves the JotClass for a specific class.

Parameters:
className - the fully qualified name of the class.
needs - whether to retrieve the compiled or source version of the class
Returns:
a JotClass representing the model of the class, or null if the class cannot be found in the required version.
See Also:
JotManager.PREFER_SOURCE, JotManager.PREFER_CLASS, JotManager.NEED_SOURCE, JotManager.NEED_CLASS

getPackage

public java.lang.String getPackage(JotFile importContext,
                                   java.lang.String className)
Retrieves a string representation of apackage containing a given class, based on a specific import context.

Parameters:
importContext - a JotFile to use for resolving the classname.
className - to name of the class to locate.
Returns:
the name of the package containing the class, or null if no matching package is found.

getPackageList

public java.util.Iterator getPackageList(int needs)
Retrieves a list of packages available under the configuration associated with this JotManager instance.

Parameters:
needs - the type of packages to list: sourcepath packages, classpath packages, or both.
Returns:
an Iterator over the list of packages. Each package is returned as a String.
See Also:
JotManager.NEED_SOURCE, JotManager.NEED_CLASS

getPackages

public java.util.Iterator getPackages(java.lang.String base,
                                      int needs)
Retrieves a list of strings representing sub-packages located under a specific package. Only the packages directly under the package is returned.

Parameters:
base - the package base (for example, java).
needs - the type of packages to list.
Returns:
an Iterator over the list of sub-packages. Each package is returned as a String. For example, calling getPackages for java would return java.applet, java.awt, etc. in the iterator.

getClassList

public java.util.Iterator getClassList(java.lang.String pkgName,
                                       int needs)
Retrieves a list of classes available in a package

Parameters:
pkgName - the name of the package for which classes are requested.
needs - the type of classes to list: sourcepath classes, classpath classes, or both.
Returns:
an Iterator over the list of classes. Each class is returned as a JotClass instance
See Also:
JotManager.NEED_ANY, JotManager.NEED_SOURCE, JotManager.NEED_CLASS

getClassNameList

public java.util.Iterator getClassNameList(java.lang.String pkgName,
                                           int needs)
Retrieves a list of classes available in a package

Parameters:
pkgName - the name of the package for which classes are requested.
needs - the type of classes to list: sourcepath classes, classpath classes, or both.
Returns:
an Iterator over the list of classes. Each class name is returned as a String
See Also:
JotManager.NEED_ANY, JotManager.NEED_SOURCE, JotManager.NEED_CLASS

getType

public JotType getType(java.lang.String classname)
Retrieves the JotType for a class.

Parameters:
classname - the name of the class
Returns:
a JotType object representing the type.

getJotTypeInfo

public JotTypeInfo getJotTypeInfo(java.lang.String className,
                                  int needs)
Returns a JotTypeInfo instance for the given classname. A JotTypeInfo contains a JotType and accessors to allow the holder to determine if the class referenced by the JotType is an interface, and determine its public/private modifiers.

This interface exists as an alternate to getClass() for callers that are only interested in those specific attributes.

Returns:
a JotTypeInfo instance for the given classname.

getAllClassDescriptors

public java.util.Iterator getAllClassDescriptors()
Returns:
a list of JotClassDescriptor items for all classes present in the databases scope. Will cause the database to become up to date. The list should be sorted by class name.

getAllClassDescriptors

public java.util.Iterator getAllClassDescriptors(java.lang.String beginsWith,
                                                 boolean ignoreCase)
Parameters:
beginsWith - a string to filter the list.
ignoreCase - if true the filtering will ignore the case.
Returns:
a list of JotClassDescriptor items for all classes present in the databases scope, who's class names begin with the given string. Will cause the database to become up to date. The list should be sorted by class name.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.