Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.jdeveloper.java.provider
Class BaseFileProvider

java.lang.Object
  extended by oracle.jdeveloper.java.provider.BaseFileProvider

All Implemented Interfaces:
JavaProvider, JavaProvider2, JavaFileProvider, ProviderConstants
Direct Known Subclasses:
CachedFileProvider

public abstract class BaseFileProvider
extends java.lang.Object
implements JavaFileProvider, ProviderConstants, JavaProvider2

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.BaseClass
          Our ClCass implementation to override handling of inner class searching and source file hints for SourceClass searching.
protected  class BaseFileProvider.BasePackage
          This is a basic wrapper implementation of JavaPackage.

 

Field Summary
protected  ProviderContext context
          Environment 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 JavaType representing 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 JavaClass for 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 JavaClass for 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.
protected  JavaFile getLightSourceFileImpl(java.net.URL sourceURL)
          Fetch a "light" SourceFile for the given Java source URL (*.java), packaged as a JavaFile.
 JavaPackage getPackage(java.lang.String fqName)
          Fetch the JavaPackage for 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 TextBuffer instance 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.
 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

context

protected ProviderContext context
Environment defining filesystem access, user-defined preference retrieval, and other things.

Constructor Detail

BaseFileProvider

protected BaseFileProvider(ProviderContext contextIn)

Method Detail

getClassLocator

public abstract JavaClassLocator getClassLocator()
Fetch the class locator to use for locating files.

getClassLocatorInterruptibly

public JavaClassLocator getClassLocatorInterruptibly()
                                              throws java.lang.InterruptedException
Get the class locator for this provider. May be overridden by subclasses to provide support for interruption.
Returns:
the class locator for this provider
Throws:
java.lang.InterruptedException - if the calling thread is interrupted while the locator is being created

getConteXt

public ProviderContext getConteXt()
Gets the context that this provider is using. For internal use only.

setConteXt

public void setConteXt(ProviderContext c)
Sets the context that we'll use. For internal use only.

notifyOfChange

public void notifyOfChange(java.net.URL url)
Called by the ProviderEnvironment when a change has happened to an URL that we were tracking.

getFileType

protected final int getFileType(java.net.URL url)
Returns:
the type of the url, CLASS_TYPE, SOURCE_TYPE, or UNKNOWN_TYPE

getFile

public JavaFile getFile(java.net.URL url)
Fetch the JavaFile for the given URL. The URL can be either a Java class file (*.class) or a Java source file (*.java). The classes contained in that file represented by the URL can be fetched from the JavaFile.
Specified by:
getFile in interface JavaFileProvider
Parameters:
url - the URL to get the Java file for
Returns:
the Java file for that URL.

getTextBuffer

public TextBuffer getTextBuffer(java.net.URL url)
Description copied from interface: JavaProvider
Fetch a TextBuffer instance for the specified URL. This is used currently for parsing and resolving a SourceFile. This method may be removed in the future.
Specified by:
getTextBuffer in interface JavaProvider
Parameters:
url - the URL to fetch the TextBuffer for
Returns:
the text buffer instance for the input URL

getSourceFile

public SourceFile getSourceFile(java.net.URL sourceURL)
Fetch the SourceFile for the given Java source URL (*.java). The classes contained in the file represented by the URL can be fetched from the source file. If the URL does not represent a valid Java source file, or if the URL points to a non-existing file, then null will be returned.
Specified by:
getSourceFile in interface JavaFileProvider
Parameters:
sourceURL - the source URL to get the Java file for
Returns:
the source file for the source URL

getSourceFile

public SourceFile getSourceFile(TextBuffer textBuffer)
Creates a new SourceFile from the input TextBuffer but NOT tied any particular Java source URL. In particular, that means that the contents of this SourceFile are NOT fetchable and therefore this SourceFile cannot be referenced by any other.
Specified by:
getSourceFile in interface JavaFileProvider
Returns:
a newly created SourceFile based on the input TextBuffer.

getClassFileImpl

protected JavaFile getClassFileImpl(java.net.URL classURL)
Fetch the JavaFile for the given Java class URL (*.class). The classes contained in the file represented by the URL can be fetched from the class file. If the URL does not represent a valid Java class file, or if the URL points to a non-existing file, then null will be returned.
Parameters:
classURL - the class URL to get the Java file for
Returns:
the class file for the class URL

getJavaFile

protected JavaFile getJavaFile(JavaClass javaClass)
Fetch the JavaFile instance for a JavaClass.
Returns:
the JavaFile instance containing this JavaClass, or null if it could not be found

getSourceFileImpl

protected SourceFile getSourceFileImpl(java.net.URL sourceURL)
Fetch the SourceFile for the given Java source URL (*.java). This is a source-version of getClassFileImpl().
Parameters:
sourceURL - the source URL to get the SourceFile for
Returns:
the source file for the source URL

getLightSourceFileImpl

protected JavaFile getLightSourceFileImpl(java.net.URL sourceURL)
Fetch a "light" SourceFile for the given Java source URL (*.java), packaged as a JavaFile. This is the preferred way to get class and member information from a source IFF the caller doesn't care about the code inside method bodies, since this call triggers a fast parse that skips method bodies. Use getSourceFileImpl to trigger a full parse that also collects information from method bodies.
Parameters:
sourceURL - the source URL from which to get the source
Returns:
the "light" SourceFile for the source URL

createSourceFile

public SourceFile createSourceFile(java.net.URL sourceURL)
                            throws java.io.IOException,
                                   java.lang.IllegalArgumentException
Creates a new SourceFile for the given Java source URL (*.java). This will create a new empty file for the given URL, and return a SourceFile instance for it. If the file already exists on disk, then this will return null.
Specified by:
createSourceFile in interface JavaFileProvider
Parameters:
sourceURL - the source URL to create a new Java file for
Returns:
the new source file for the source URL, or null if the file could not be created because it exists
Throws:
java.io.IOException - if the new file cannot be created
java.lang.IllegalArgumentException - if the URL is not recognized as a Java source file

getClass

public JavaClass getClass(java.lang.String fqName)
If fqName is a primitive type, the implementer is required to return the canonical PrimitiveType instance. PrimitiveType is in the "common" subpackage and implementers can get the correct one by calling JavaUtilities.getPrimitiveType(S). This doesn't have to return the same JavaType instance each time, but it improve performance dramatically if it did. Hint hint.
Specified by:
getClass in interface JavaProvider
Parameters:
fqName - The fully qualified name in dotted notation. e.g. java.lang.Object, java.util.Map.Entry
Returns:
the JavaClass instance for the given qualified type name, or null if it cannot be found

getClassInterruptibly

public JavaClass getClassInterruptibly(java.lang.String fqName)
                                throws java.lang.InterruptedException
If fqName is a primitive type, the implementer is required to return the canonical PrimitiveType instance. PrimitiveType is in the "common" subpackage and implementers can get the correct one by calling JavaUtilities.getPrimitiveType(S). This doesn't have to return the same JavaType instance each time, but it improve performance dramatically if it did. Hint hint.
Specified by:
getClassInterruptibly in interface JavaProvider2
Parameters:
fqName - The fully qualified name in dotted notation. e.g. java.lang.Object, java.util.Map.Entry
Returns:
the JavaClass instance for the given qualified type name, or null if it cannot be found
Throws:
java.lang.InterruptedException - when the operation is interrupted

getClassImpl

protected JavaClass getClassImpl(java.lang.String fqName,
                                 boolean interruptibly)
                          throws java.lang.InterruptedException
If fqName is a primitive type, the implementer is required to return the canonical PrimitiveType instance. PrimitiveType is in the "common" subpackage and implementers can get the correct one by calling JavaUtilities.getPrimitiveType(S). This doesn't have to return the same JavaType instance each time, but it improve performance dramatically if it did. Hint hint.
Parameters:
fqName - The fully qualified name in dotted notation. e.g. java.lang.Object, java.util.Map.Entry
interruptibly - if true, throw InterruptedExceptions when interrupted
Throws:
java.lang.InterruptedException - when the operation is interrupted

getClassLeftToRight

protected JavaClass getClassLeftToRight(java.lang.String fqName)
Utility routine to do the left-to-right resolution search to try to locate a given class.
Parameters:
fqName - the fully-qualified class name in dotted notation
Returns:
the class if found, null otherwise

getClassLeftToRightInterruptibly

protected JavaClass getClassLeftToRightInterruptibly(java.lang.String fqName)
                                              throws java.lang.InterruptedException
Utility routine to do the left-to-right resolution search to try to locate a given class.
Parameters:
fqName - the fully-qualified class name in dotted notation
Returns:
the class if found, null otherwise
Throws:
java.lang.InterruptedException - if the operation was interrupted

getClassLeftToRightImpl

protected JavaClass getClassLeftToRightImpl(java.lang.String fqName,
                                            boolean interruptibly)
                                     throws java.lang.InterruptedException
Utility routine to do the left-to-right resolution search to try to locate a given class.
Parameters:
fqName - the fully-qualified class name in dotted notation
interruptibly - If true, throw an InterruptedException when interrupted.
Returns:
the class if found, null otherwise
Throws:
java.lang.InterruptedException - if the operation was interrupted

getClassExactImpl

protected JavaClass getClassExactImpl(java.lang.String fqOuterClassName)
Utility routine to try to locate the given outer class.
Parameters:
fqOuterClassName - the name of the fully-qualified outer class name we are searching for
Returns:
the class we are trying to find, or null if it cannot be found

getClassExactImplInterruptibly

protected JavaClass getClassExactImplInterruptibly(java.lang.String fqOuterClassName)
                                            throws java.lang.InterruptedException
Utility routine to try to locate the given outer class.
Parameters:
fqOuterClassName - the name of the fully-qualified outer class name we are searching for
Returns:
the class we are trying to find, or null if it cannot be found
Throws:
java.lang.InterruptedException - if the search was interrupted

checkInterrupt

protected void checkInterrupt()
                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

getClass

public 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.
Specified by:
getClass in interface JavaProvider
Parameters:
fqPrefix - the fully-qualified prefix
name - the name of the class
Returns:
the JavaClass instance for the given qualified type name or null it cannot be found

getClassInterruptibly

public JavaClass getClassInterruptibly(java.lang.String fqPrefix,
                                       java.lang.String name)
                                throws java.lang.InterruptedException
The same thing as getClass(S) except that the client can save on the string concatenate.
Specified by:
getClassInterruptibly in interface JavaProvider2
Parameters:
fqPrefix - the fully-qualified prefix
name - the name of the class
Returns:
the JavaClass instance for the given qualified type name or null it cannot be found
Throws:
java.lang.InterruptedException - if the task was interrupted

getClassImpl

protected JavaClass getClassImpl(java.lang.String fqPrefix,
                                 java.lang.String name,
                                 boolean interruptibly)
                          throws java.lang.InterruptedException
The same thing as getClass(S) except that the client can save on the string concatenate.
Throws:
java.lang.InterruptedException

getClassByVMName

public JavaClass getClassByVMName(java.lang.String fqVMName)
Description copied from interface: JavaProvider
Fetch the JavaClass 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.

Specified by:
getClassByVMName in interface JavaProvider
Parameters:
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$Entry
Returns:
the JavaClass instance for the given qualified type name in VM notation, or null if it cannot be found

getClassByVMNameInterruptibly

public JavaClass getClassByVMNameInterruptibly(java.lang.String fqVMName)
                                        throws java.lang.InterruptedException
Description copied from interface: JavaProvider2
Fetch the JavaClass 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.

Specified by:
getClassByVMNameInterruptibly in interface JavaProvider2
Parameters:
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$Entry
Returns:
the JavaClass instance for the given qualified type name in VM notation, or null if it cannot be found
Throws:
java.lang.InterruptedException - when the operation is interrupted

getClassByVMNameImpl

protected JavaClass getClassByVMNameImpl(java.lang.String fqVMName,
                                         boolean interruptibly)
                                  throws java.lang.InterruptedException
Parameters:
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$Entry
interruptibly - if true, throw InterruptedExceptions when interrupted
Throws:
java.lang.InterruptedException - when the operation is interrupted

getInnerClassByVMName

protected JavaClass getInnerClassByVMName(java.lang.String fqVMName)
Utility routine to locate inner classes for *.class files only based on the raw VM notation name.
Parameters:
fqVMName - the raw VM name, such as "java/util/Map$Entry"
Returns:
the class for the inner class sought

locateClass

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. The fully-qualified class could be either an inner or outer class. This should be called only for *.class file instances of JavaFile.
Parameters:
javaFile - the java file to search through
fqName - the fully-qualified class name to search for
Returns:
the class we are searching for, or null if not found

locateClass

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. The fully-qualified class could be either an inner or outer class. The javaClass specified may also be an inner or outer class.
Parameters:
javaClass - the class instance to search through
fqName - the fully-qualified class name we are searching for
Returns:
the class we are looking for, null if not found

locateClassByVMName

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. The fully-qualified could be either an inner or outer class. The javaClass specified may also be an inner or outer class.
Parameters:
javaClass - the class instance to search through
fqVMName - the fully-qualified raw class name we are searching for
Returns:
the class we are looking for, null if not found

getSourceClass

public SourceClass getSourceClass(java.lang.String fqName)
Retrieves the matching top-level SourceClass in the search space. Provided for convenience.
Specified by:
getSourceClass in interface JavaProvider
Parameters:
fqName - The fully qualified name in dotted notation. e.g. java.lang.Object, java.util.Map.Entry
Returns:
the SourceClass instance for the given qualified type name, or null if it cannot be found

getSourceClassInterruptibly

public SourceClass getSourceClassInterruptibly(java.lang.String fqName)
                                        throws java.lang.InterruptedException
Retrieves the matching top-level SourceClass in the search space. Provided for convenience.
Specified by:
getSourceClassInterruptibly in interface JavaProvider2
Parameters:
fqName - The fully qualified name in dotted notation. e.g. java.lang.Object, java.util.Map.Entry
Returns:
the SourceClass instance for the given qualified type name, or null if it cannot be found
Throws:
java.lang.InterruptedException - if the taks is interrupted

getSourceClassImpl

protected SourceClass getSourceClassImpl(java.lang.String fqName,
                                         boolean interruptibly)
                                  throws java.lang.InterruptedException
Retrieves the matching top-level SourceClass in the search space. Provided for convenience.
Parameters:
fqName - The fully qualified name in dotted notation. e.g. java.lang.Object, java.util.Map.Entry
Throws:
java.lang.InterruptedException - if the taks is interrupted

getSourceClassByHint

protected SourceClass getSourceClassByHint(JavaClass searchClass,
                                           java.lang.String sourceFileHint)
Retrieves the matching top-level SourceClass in the search space. Used by the classfile reader.
Parameters:
sourceFileHint - The SourceFile attribute (or a synthetic equivalent) value from the class file. May be null.

locateSourceClass

protected SourceClass locateSourceClass(SourceFile sourceFile,
                                        java.lang.String fqName)
Source version of locateClass() for locating a SourceClass instance within a SourceFile.
Parameters:
sourceFile - the source file instance to search throguh
fqName - the fully-qualified class name we are searching for
Returns:
the class we are looking for, or null if not found

locateSourceClass

protected SourceClass locateSourceClass(SourceClass sourceClass,
                                        java.lang.String fqName)
Source version of locateClass() for locating SourceClass instances.
Parameters:
sourceClass - the source class instance to search through
fqName - the fully-qualified class name we are searching for
Returns:
the class we are looking for, null if not found

getPrimitiveClass

protected JavaClass getPrimitiveClass(java.lang.String name)
Returns:
the primitive type representing the given name, or null if it does not represent a primitive type

getArrayType

public JavaType getArrayType(JavaType component,
                             int dimensions)
Description copied from interface: JavaProvider
Fetch the JavaType representing the given array type of the specified component type and dimensions.
Specified by:
getArrayType in interface JavaProvider
Parameters:
component - the component type to generate an array type for
dimensions - the array dimensions for the array type
Returns:
The JavaType representing an array type of the given component type with the given number of dimensions.

getArrayTypeImpl

protected JavaType getArrayTypeImpl(java.lang.String typeKey,
                                    JavaType component,
                                    int dimensions)
Fetch the array type represented by the given type and dimensions.
Parameters:
typeKey - the qualified name of the type followed by the '[]'s for the dimension
component - the java type
dimensions - the array dimension
Returns:
the array type for the given java type and dimensions

getPackage

public JavaPackage getPackage(java.lang.String fqName)
Description copied from interface: JavaProvider
Fetch the JavaPackage for the given fully-qualified package prefix. An empty String ("") represents the root package.
Specified by:
getPackage in interface JavaProvider
Parameters:
fqName - Empty string means the root package.
Returns:
the requested JavaPackage, or null if the prefix was null

getPackageImpl

protected BaseFileProvider.BasePackage getPackageImpl(java.lang.String fqName)
Fetch the JavaPackage instance for the given package.

getPackage

protected JavaPackage getPackage(java.lang.String packagePrefix,
                                 java.lang.String name)
Gets the given sub package.
Parameters:
packagePrefix - Should be "" for the root package.

getTargetJdkVersion

protected int getTargetJdkVersion()
Get the target JDK version
Returns:
Valid values are JavaConstants.J2SE_*.

setTargetJdkVersion

protected void setTargetJdkVersion(int targetJdkVersion)
Set the target JDK version, valid values are JavaConstants.J2SE_*
Parameters:
targetJdkVersion - The target JDK version

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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