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

E13403-03

oracle.jdeveloper.audit.java
Class JavaTransformContext

java.lang.Object
  extended by oracle.jdeveloper.audit.transform.TransformContext
      extended by oracle.jdeveloper.audit.java.JavaTransformContext
All Implemented Interfaces:
Violation

public class JavaTransformContext
extends TransformContext

The TransformContext for transforms which use the JDeveloper Java model (oracle.javatools.parser.java.v2.model).


Constructor Summary
JavaTransformContext(JavaTransformAdapter adapter, Transform transform, Violation violation, Location location)
           
 
Method Summary
 void ensureImport(JavaType type)
          Ensures that a type is imported by the SourceFile enclosing the location of this context.
 void ensureImport(java.lang.String typeName)
          Ensures that a type is imported by the SourceFile enclosing the location of this context.
 void ensureImportRetained(java.lang.String typeName)
          Ensures that a type is imported by the SourceFile enclosing the location of this context, and retains the import even if unused.
 void ensureImports(java.util.Collection types)
          Ensures that types are imported by the SourceFile enclosing the location of this context.
 void ensureImports(java.lang.String[] typeNames)
          Ensures that types are imported by the SourceFile enclosing the location of this context.
 JavaManager getJavaManager()
          Gets the JavaManager for the project of this context.
 SourceFactory getSourceFactory()
          Gets the SourceFactory for the location of this context.
 SourceFile getSourceFile()
          Gets the SourceFile enclosing the location of this context.
 JavaClass getType(java.lang.String qualifiedName)
          Gets a class in the context of the location of this context.
 JavaClass[] getTypes(java.lang.String[] qualifiedNames)
          Gets an array of classes in the context of the location of this context.
 
Methods inherited from class oracle.jdeveloper.audit.transform.TransformContext
addHighlight, addRemovedHighlight, getAdapter, getAttribute, getDefaultTransform, getFocusLocation, getIdeContext, getLocation, getModelAdapter, getNode, getParameter, getParameterCount, getParameterName, getParameterValue, getParameterValue, getPredecessorApplyData, getProject, getRule, getSerialNumber, getTransform, getTransform, getTransformCount, getTransformFocusLocation, getVariation, getViolation, getWorkspace, invokeLater, setAttribute, setPredecessorApplyData, setSelection, setSelection, setSelection, setSelection, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaTransformContext

public JavaTransformContext(JavaTransformAdapter adapter,
                            Transform transform,
                            Violation violation,
                            Location location)
Method Detail

getJavaManager

public JavaManager getJavaManager()
Gets the JavaManager for the project of this context.


getSourceFile

public SourceFile getSourceFile()
Gets the SourceFile enclosing the location of this context.


getSourceFactory

public SourceFactory getSourceFactory()
Gets the SourceFactory for the location of this context.


getType

public JavaClass getType(java.lang.String qualifiedName)
Gets a class in the context of the location of this context.

Parameters:
qualifiedName - The fully-qualified name of the type

getTypes

public JavaClass[] getTypes(java.lang.String[] qualifiedNames)
Gets an array of classes in the context of the location of this context.

Parameters:
qualifiedNames - An array of the fully-qualified names of the types.

ensureImport

public void ensureImport(JavaType type)
Ensures that a type is imported by the SourceFile enclosing the location of this context.

Parameters:
type - the JavaType to import.

ensureImport

public void ensureImport(java.lang.String typeName)
Ensures that a type is imported by the SourceFile enclosing the location of this context.

Parameters:
typeName - the qualified name of the type to import.

ensureImportRetained

public void ensureImportRetained(java.lang.String typeName)
Ensures that a type is imported by the SourceFile enclosing the location of this context, and retains the import even if unused.

Parameters:
typeName - the qualified name of the type to import.

ensureImports

public void ensureImports(java.util.Collection types)
Ensures that types are imported by the SourceFile enclosing the location of this context.

Parameters:
types - a Collection of JavaTypes to import.

ensureImports

public void ensureImports(java.lang.String[] typeNames)
Ensures that types are imported by the SourceFile enclosing the location of this context.

Parameters:
typeNames - an array of qualified names of types to import.

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

E13403-03

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