Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.javatools.parser.java.v2.model
Interface CompiledImport

All Superinterfaces:
Element, JavaElement, JavaHasName
All Known Subinterfaces:
SourceImport

public interface CompiledImport
extends JavaElement, JavaHasName

A traditional narrow import declaration imports a single type.

A traditional wide import declaration imports potentially all the types in the qualifying package or qualifying type. For our purposes, the root package is the implicit qualifier if no qualifying element is present in the declaration (i.e. no dot).

A static narrow import declaration imports all member types, fields, and methods of the given name from the qualifying type.

Top-level types may not be imported in this fashion. A static wide import declaration imports potentially all the member types, fields, and methods from the qualifying type. Top-level types may not be imported in this fashion.


Field Summary
 
Fields inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
EMPTY_ARRAY
 
Method Summary
 JavaHasType getImportedElementAt(int index)
           
 int getImportedElementCount()
           
 java.util.Collection getImportedElements()
           
 JavaClass getQualifyingType()
          If this import is a static import, then there must be a qualifying type.
 boolean isStatic()
           
 boolean isUsed()
           
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasName
getName
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo
 

Method Detail

isStatic

boolean isStatic()
Returns:
True if this is a static import. False otherwise.

isUsed

boolean isUsed()
Returns:
True if this import was used during compilation. False otherwise (indicates an unused import).

getImportedElements

java.util.Collection getImportedElements()
Returns:
The array of imported elements.

getImportedElementCount

int getImportedElementCount()
Returns:
The number of elements imported by this import.

getImportedElementAt

JavaHasType getImportedElementAt(int index)
Parameters:
index - 0-based
Returns:
Null if the indicated element does not exist.

getQualifyingType

JavaClass getQualifyingType()
If this import is a static import, then there must be a qualifying type. The narrow import form is "import static T.name;". The wide import form is "import static T.*;".

Returns:
The qualifying type if present. Null if the qualifying type is not found or if the qualifying element is a package.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

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