Skip navigation links

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

E17493-04


oracle.javatools.parser.java.v2
Interface JavaProvider2

All Superinterfaces:
JavaProvider
All Known Implementing Classes:
BaseFileProvider, CachedFileProvider, SimpleFileProvider

public interface JavaProvider2
extends JavaProvider

Extends the JavaProvider interface.

Since:
11.1.2.0.0

Method Summary
 JavaClass getClassByVMNameInterruptibly(java.lang.String fqVmName)
          Fetch the JavaClass for the specified fully-qualified type name in VM notation.
 JavaClass getClassInterruptibly(java.lang.String fqName)
          Fetch the JavaClass for the given fully-qualified type name in dotted notation.
 JavaClass getClassInterruptibly(java.lang.String fqPrefix, java.lang.String name)
          Fetch the JavaClass for the given qualified class.
 SourceClass getSourceClassInterruptibly(java.lang.String fqName)
          Fetch the SourceClass for the fully-qualified class name.

 

Methods inherited from interface oracle.javatools.parser.java.v2.JavaProvider
getArrayType, getClass, getClass, getClassByVMName, getPackage, getSourceClass, getTextBuffer

 

Method Detail

getClassInterruptibly

JavaClass getClassInterruptibly(java.lang.String fqName)
                                throws java.lang.InterruptedException
Fetch the JavaClass for the given fully-qualified type name in dotted notation. The type may denote a primitive type, or a class type.

If the qualified name specified represents a primitive type, then 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 CommonUtilities.getPrimitiveType( String ).

If the qualified name specified 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.

For class types, implementations are required to perform left-to-right class resolution.

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.

Parameters:
fqName - the fully-qualified type name in dotted notation, such as "java.lang.Object" or "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 - if the task was interrupted

getClassInterruptibly

JavaClass getClassInterruptibly(java.lang.String fqPrefix,
                                java.lang.String name)
                                throws java.lang.InterruptedException
Fetch the JavaClass for the given qualified class. This is similar to getClass( String fqName ) except that it splits out the fully-qualified prefix and class name for convenience.

Implementations can concatenate the fqPrefix and name together and just rely on the getClass( String fqName ) method.

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

getClassByVMNameInterruptibly

JavaClass getClassByVMNameInterruptibly(java.lang.String fqVmName)
                                        throws java.lang.InterruptedException
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.

Parameters:
fqVmName - the fully-qualified type name (different from the qualified source name and different from the descriptor) in VM notation, such as "java/lang/Object" or "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 - if the task was interrupted

getSourceClassInterruptibly

SourceClass getSourceClassInterruptibly(java.lang.String fqName)
                                        throws java.lang.InterruptedException
Fetch the SourceClass for the fully-qualified class name. The name must represent a class type. Implementations must base the class information on Java source (*.java) content.

Similar to getClass( String fqName ), implementations must perform left-to-right package/class resolution.

Parameters:
fqName - the fully-qualified type name in dotted notation, such as "java.lang.Object" or "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 task was interrupted

Skip navigation links

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

E17493-04


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