| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.jdeveloper.java.provider.BaseFileProvider
public abstract class BaseFileProvider
The BaseFileProvider is an abstract starting point for
 an implementation of the JavaFileProvider interface that relies
 on a JavaClassLocator instance for locating Java class and
 source files. 
This implementation contains no caching.
| Nested Class Summary | |
|---|---|
| protected  class | BaseFileProvider.BaseClassOur ClCass implementation to override handling of inner class searching and source file hints for SourceClass searching. | 
| protected  class | BaseFileProvider.BasePackageThis is a basic wrapper implementation of JavaPackage. | 
| Field Summary | |
|---|---|
| protected  ProviderContext | contextEnvironment defining filesystem access, user-defined preference retrieval, and other things. | 
| Fields inherited from interface oracle.jdeveloper.java.provider.ProviderConstants | 
|---|
| CLASS_TYPE, EMPTY_COLLECTION, SOURCE_TYPE, UNKNOWN_TYPE | 
| Constructor Summary | |
|---|---|
| protected  | BaseFileProvider(ProviderContext contextIn) | 
| Method Summary | |
|---|---|
| protected  void | checkInterrupt() | 
|  SourceFile | createSourceFile(java.net.URL sourceURL)Creates a new SourceFile for the given Java source URL (*.java). | 
|  JavaType | getArrayType(JavaType component,
             int dimensions)Fetch the JavaTyperepresenting the given array type
 of the specified component type and dimensions. | 
| protected  JavaType | getArrayTypeImpl(java.lang.String typeKey,
                 JavaType component,
                 int dimensions)Fetch the array type represented by the given type and dimensions. | 
|  JavaClass | getClass(java.lang.String fqName)If fqName is a primitive type, the implementer is required to return the canonical PrimitiveType instance. | 
|  JavaClass | getClass(java.lang.String fqPrefix,
         java.lang.String name)The same thing as getClass(S) except that the client can save on the string concatenate. | 
|  JavaClass | getClassByVMName(java.lang.String fqVMName)Fetch the JavaClassfor the specified fully-qualified
 type name in VM notation. | 
| protected  JavaClass | getClassByVMNameImpl(java.lang.String fqVMName,
                     boolean interruptibly) | 
|  JavaClass | getClassByVMNameInterruptibly(java.lang.String fqVMName)Fetch the JavaClassfor the specified fully-qualified
 type name in VM notation. | 
| protected  JavaClass | getClassExactImpl(java.lang.String fqOuterClassName)Utility routine to try to locate the given outer class. | 
| protected  JavaClass | getClassExactImplInterruptibly(java.lang.String fqOuterClassName)Utility routine to try to locate the given outer class. | 
| protected  JavaFile | getClassFileImpl(java.net.URL classURL)Fetch the JavaFile for the given Java class URL (*.class). | 
| protected  JavaClass | getClassImpl(java.lang.String fqName,
             boolean interruptibly)If fqName is a primitive type, the implementer is required to return the canonical PrimitiveType instance. | 
| protected  JavaClass | getClassImpl(java.lang.String fqPrefix,
             java.lang.String name,
             boolean interruptibly)The same thing as getClass(S) except that the client can save on the string concatenate. | 
|  JavaClass | getClassInterruptibly(java.lang.String fqName)If fqName is a primitive type, the implementer is required to return the canonical PrimitiveType instance. | 
|  JavaClass | getClassInterruptibly(java.lang.String fqPrefix,
                      java.lang.String name)The same thing as getClass(S) except that the client can save on the string concatenate. | 
| protected  JavaClass | getClassLeftToRight(java.lang.String fqName)Utility routine to do the left-to-right resolution search to try to locate a given class. | 
| protected  JavaClass | getClassLeftToRightImpl(java.lang.String fqName,
                        boolean interruptibly)Utility routine to do the left-to-right resolution search to try to locate a given class. | 
| protected  JavaClass | getClassLeftToRightInterruptibly(java.lang.String fqName)Utility routine to do the left-to-right resolution search to try to locate a given class. | 
| abstract  JavaClassLocator | getClassLocator()Fetch the class locator to use for locating files. | 
|  JavaClassLocator | getClassLocatorInterruptibly()Get the class locator for this provider. | 
|  ProviderContext | getConteXt()Gets the context that this provider is using. | 
|  JavaFile | getFile(java.net.URL url)Fetch the JavaFile for the given URL. | 
| protected  int | getFileType(java.net.URL url) | 
| protected  JavaClass | getInnerClassByVMName(java.lang.String fqVMName)Utility routine to locate inner classes for *.class files only based on the raw VM notation name. | 
| protected  JavaFile | getJavaFile(JavaClass javaClass)Fetch the JavaFile instance for a JavaClass. | 
|  JavaPackage | getPackage(java.lang.String fqName)Fetch the JavaPackagefor the given fully-qualified
 package prefix. | 
| protected  JavaPackage | getPackage(java.lang.String packagePrefix,
           java.lang.String name)Gets the given sub package. | 
| protected  BaseFileProvider.BasePackage | getPackageImpl(java.lang.String fqName)Fetch the JavaPackage instance for the given package. | 
| protected  JavaClass | getPrimitiveClass(java.lang.String name) | 
|  SourceClass | getSourceClass(java.lang.String fqName)Retrieves the matching top-level SourceClass in the search space. | 
| protected  SourceClass | getSourceClassByHint(JavaClass searchClass,
                     java.lang.String sourceFileHint)Retrieves the matching top-level SourceClass in the search space. | 
| protected  SourceClass | getSourceClassImpl(java.lang.String fqName,
                   boolean interruptibly)Retrieves the matching top-level SourceClass in the search space. | 
|  SourceClass | getSourceClassInterruptibly(java.lang.String fqName)Retrieves the matching top-level SourceClass in the search space. | 
|  SourceFile | getSourceFile(TextBuffer textBuffer)Creates a new SourceFile from the input TextBuffer but NOT tied any particular Java source URL. | 
|  SourceFile | getSourceFile(java.net.URL sourceURL)Fetch the SourceFile for the given Java source URL (*.java). | 
| protected  SourceFile | getSourceFileImpl(java.net.URL sourceURL)Fetch the SourceFile for the given Java source URL (*.java). | 
| protected  int | getTargetJdkVersion()Get the target JDK version | 
|  TextBuffer | getTextBuffer(java.net.URL url)Fetch a TextBufferinstance for the specified URL. | 
| protected  JavaClass | locateClass(JavaClass javaClass,
            java.lang.String fqName)Utility routine to search through the given JavaClass instance to find the fully-qualified class specified. | 
| protected  JavaClass | locateClass(JavaFile javaFile,
            java.lang.String fqName)Utility routine to search through the given JavaFile instance to find the fully-qualified class specified. | 
| protected  JavaClass | locateClassByVMName(JavaClass javaClass,
                    java.lang.String fqVMName)Utility routine to search through the given JavaClass instance to find the fully-qualified class by raw name. | 
| protected  SourceClass | locateSourceClass(SourceClass sourceClass,
                  java.lang.String fqName)Source version of locateClass() for locating SourceClass instances. | 
| protected  SourceClass | locateSourceClass(SourceFile sourceFile,
                  java.lang.String fqName)Source version of locateClass() for locating a SourceClass instance within a SourceFile. | 
| protected  void | notifyOfChange(java.net.URL url)Called by the ProviderEnvironment when a change has happened to an URL that we were tracking. | 
|  void | setConteXt(ProviderContext c)Sets the context that we'll use. | 
| protected  void | setTargetJdkVersion(int targetJdkVersion)Set the target JDK version, valid values are JavaConstants.J2SE_* | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected ProviderContext context
| Constructor Detail | 
|---|
protected BaseFileProvider(ProviderContext contextIn)
| Method Detail | 
|---|
public abstract JavaClassLocator getClassLocator()
public JavaClassLocator getClassLocatorInterruptibly()
                                              throws java.lang.InterruptedException
java.lang.InterruptedException - if the calling thread is interrupted while
   the locator is being createdpublic ProviderContext getConteXt()
public void setConteXt(ProviderContext c)
protected void notifyOfChange(java.net.URL url)
protected final int getFileType(java.net.URL url)
public JavaFile getFile(java.net.URL url)
getFile in interface JavaFileProviderurl - the URL to get the Java file for
public TextBuffer getTextBuffer(java.net.URL url)
JavaProviderTextBuffer instance for the specified URL.
 This is used currently for parsing and resolving a SourceFile.
 This method may be removed in the future.
getTextBuffer in interface JavaProviderurl - the URL to fetch the TextBuffer for
public SourceFile getSourceFile(java.net.URL sourceURL)
getSourceFile in interface JavaFileProvidersourceURL - the source URL to get the Java file for
public SourceFile getSourceFile(TextBuffer textBuffer)
getSourceFile in interface JavaFileProviderprotected JavaFile getClassFileImpl(java.net.URL classURL)
classURL - the class URL to get the Java file for
protected JavaFile getJavaFile(JavaClass javaClass)
protected SourceFile getSourceFileImpl(java.net.URL sourceURL)
sourceURL - the source URL to get the SourceFile for
public SourceFile createSourceFile(java.net.URL sourceURL)
                            throws java.io.IOException,
                                   java.lang.IllegalArgumentException
createSourceFile in interface JavaFileProvidersourceURL - the source URL to create a new Java file for
java.io.IOException - if the new file cannot be created
java.lang.IllegalArgumentException - if the URL is not recognized
            as a Java source filepublic JavaClass getClass(java.lang.String fqName)
getClass in interface JavaProviderfqName - The fully qualified name in dotted notation.
 e.g. java.lang.Object, java.util.Map.Entry
public JavaClass getClassInterruptibly(java.lang.String fqName)
                                throws java.lang.InterruptedException
getClassInterruptibly in interface JavaProvider2fqName - The fully qualified name in dotted notation.
 e.g. java.lang.Object, java.util.Map.Entry
java.lang.InterruptedException - when the operation is interrupted
protected JavaClass getClassImpl(java.lang.String fqName,
                                 boolean interruptibly)
                          throws java.lang.InterruptedException
fqName - The fully qualified name in dotted notation.
 e.g. java.lang.Object, java.util.Map.Entryinterruptibly - if true, throw InterruptedExceptions when interrupted
java.lang.InterruptedException - when the operation is interruptedprotected JavaClass getClassLeftToRight(java.lang.String fqName)
fqName - the fully-qualified class name in dotted notation
protected JavaClass getClassLeftToRightInterruptibly(java.lang.String fqName)
                                              throws java.lang.InterruptedException
fqName - the fully-qualified class name in dotted notation
java.lang.InterruptedException - if the operation was interrupted
protected JavaClass getClassLeftToRightImpl(java.lang.String fqName,
                                            boolean interruptibly)
                                     throws java.lang.InterruptedException
fqName - the fully-qualified class name in dotted notationinterruptibly - If true, throw an InterruptedException when interrupted.
java.lang.InterruptedException - if the operation was interruptedprotected JavaClass getClassExactImpl(java.lang.String fqOuterClassName)
fqOuterClassName - the name of the fully-qualified outer
        class name we are searching for
protected JavaClass getClassExactImplInterruptibly(java.lang.String fqOuterClassName)
                                            throws java.lang.InterruptedException
fqOuterClassName - the name of the fully-qualified outer
        class name we are searching for
java.lang.InterruptedException - if the search was interrupted
protected void checkInterrupt()
                       throws java.lang.InterruptedException
java.lang.InterruptedException
public JavaClass getClass(java.lang.String fqPrefix,
                          java.lang.String name)
getClass in interface JavaProviderfqPrefix - the fully-qualified prefixname - the name of the class
public JavaClass getClassInterruptibly(java.lang.String fqPrefix,
                                       java.lang.String name)
                                throws java.lang.InterruptedException
getClassInterruptibly in interface JavaProvider2fqPrefix - the fully-qualified prefixname - the name of the class
java.lang.InterruptedException - if the task was interrupted
protected JavaClass getClassImpl(java.lang.String fqPrefix,
                                 java.lang.String name,
                                 boolean interruptibly)
                          throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic JavaClass getClassByVMName(java.lang.String fqVMName)
JavaProviderJavaClass for the specified fully-qualified
 type name in VM notation.  The type may denote an array type,
 a primitive type, or a class type. 
 If the qualified name specified represents an array type, the
 implementer should fetch the JavaClass for the
 underlying class first, then generate an array type for the
 class using getArrayType( class, dimensions ). 
 If the qualified name specifies a primitive type, the implementer
 is required to return the canonical PrimitiveType
 instance. 
If the qualified name represents a class type, the implementation has the choice of fetching the class information from either a Java class (*.class) or source (*.java) file. The choice is given to implementations for performance reasons, though implementations are required to provide up-to-date information.
The '/' is a package delimiter, while the '$' can be treated literally as part of the class name, or as a class delimiter. Implementations must perform left-to-right resolution on the class name portion to determine whether '$' should be interpreted literally, or as a delimiter.
 Although implementations are not required to return the same
 JavaClass instance each time, they are encouraged to
 do so as it will dramatically improve performance. 
getClassByVMName in interface JavaProviderfqVMName - The fully qualified type name (different from the
 qualified source name and different from the descriptor) in VM notation.
 e.g. java/lang/Object, java/util/Map$Entry
public JavaClass getClassByVMNameInterruptibly(java.lang.String fqVMName)
                                        throws java.lang.InterruptedException
JavaProvider2JavaClass for the specified fully-qualified
 type name in VM notation.  The type may denote an array type,
 a primitive type, or a class type. 
 If the qualified name specified represents an array type, the
 implementer should fetch the JavaClass for the
 underlying class first, then generate an array type for the
 class using getArrayType( class, dimensions ). 
 If the qualified name specifies a primitive type, the implementer
 is required to return the canonical PrimitiveType
 instance. 
If the qualified name represents a class type, the implementation has the choice of fetching the class information from either a Java class (*.class) or source (*.java) file. The choice is given to implementations for performance reasons, though implementations are required to provide up-to-date information.
The '/' is a package delimiter, while the '$' can be treated literally as part of the class name, or as a class delimiter. Implementations must perform left-to-right resolution on the class name portion to determine whether '$' should be interpreted literally, or as a delimiter.
 Although implementations are not required to return the same
 JavaClass instance each time, they are encouraged to
 do so as it will dramatically improve performance. 
getClassByVMNameInterruptibly in interface JavaProvider2fqVMName - The fully qualified type name (different from the
 qualified source name and different from the descriptor) in VM notation.
 e.g. java/lang/Object, java/util/Map$Entry
java.lang.InterruptedException - when the operation is interrupted
protected JavaClass getClassByVMNameImpl(java.lang.String fqVMName,
                                         boolean interruptibly)
                                  throws java.lang.InterruptedException
fqVMName - The fully qualified type name (different from the
 qualified source name and different from the descriptor) in VM notation.
 e.g. java/lang/Object, java/util/Map$Entryinterruptibly - if true, throw InterruptedExceptions when interrupted
java.lang.InterruptedException - when the operation is interruptedprotected JavaClass getInnerClassByVMName(java.lang.String fqVMName)
fqVMName - the raw VM name, such as "java/util/Map$Entry"
protected JavaClass locateClass(JavaFile javaFile,
                                java.lang.String fqName)
javaFile - the java file to search throughfqName - the fully-qualified class name to search for
protected JavaClass locateClass(JavaClass javaClass,
                                java.lang.String fqName)
javaClass - the class instance to search throughfqName - the fully-qualified class name we are searching for
protected JavaClass locateClassByVMName(JavaClass javaClass,
                                        java.lang.String fqVMName)
javaClass - the class instance to search throughfqVMName - the fully-qualified raw class name we are searching for
public SourceClass getSourceClass(java.lang.String fqName)
getSourceClass in interface JavaProviderfqName - The fully qualified name in dotted notation.
 e.g. java.lang.Object, java.util.Map.Entry
public SourceClass getSourceClassInterruptibly(java.lang.String fqName)
                                        throws java.lang.InterruptedException
getSourceClassInterruptibly in interface JavaProvider2fqName - The fully qualified name in dotted notation.
 e.g. java.lang.Object, java.util.Map.Entry
java.lang.InterruptedException - if the taks is interrupted
protected SourceClass getSourceClassImpl(java.lang.String fqName,
                                         boolean interruptibly)
                                  throws java.lang.InterruptedException
fqName - The fully qualified name in dotted notation.
 e.g. java.lang.Object, java.util.Map.Entry
java.lang.InterruptedException - if the taks is interrupted
protected SourceClass getSourceClassByHint(JavaClass searchClass,
                                           java.lang.String sourceFileHint)
sourceFileHint - The SourceFile attribute (or a synthetic equivalent)
                   value from the class file. May be null.
protected SourceClass locateSourceClass(SourceFile sourceFile,
                                        java.lang.String fqName)
sourceFile - the source file instance to search throguhfqName - the fully-qualified class name we are searching for
protected SourceClass locateSourceClass(SourceClass sourceClass,
                                        java.lang.String fqName)
sourceClass - the source class instance to search throughfqName - the fully-qualified class name we are searching for
protected JavaClass getPrimitiveClass(java.lang.String name)
public JavaType getArrayType(JavaType component,
                             int dimensions)
JavaProviderJavaType representing the given array type
 of the specified component type and dimensions. 
getArrayType in interface JavaProvidercomponent - the component type to generate an array type
        fordimensions - the array dimensions for the array type
protected JavaType getArrayTypeImpl(java.lang.String typeKey,
                                    JavaType component,
                                    int dimensions)
typeKey - the qualified name of the type followed by the
        '[]'s for the dimensioncomponent - the java typedimensions - the array dimension
public JavaPackage getPackage(java.lang.String fqName)
JavaProviderJavaPackage for the given fully-qualified
 package prefix.  An empty String ("") represents the root package.
getPackage in interface JavaProviderfqName - Empty string means the root package.
protected BaseFileProvider.BasePackage getPackageImpl(java.lang.String fqName)
protected JavaPackage getPackage(java.lang.String packagePrefix,
                                 java.lang.String name)
packagePrefix - Should be "" for the root package.protected int getTargetJdkVersion()
protected void setTargetJdkVersion(int targetJdkVersion)
targetJdkVersion - The target JDK version| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||