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

E13403-08

oracle.jdeveloper.compiler
Interface Translator

All Known Implementing Classes:
CopyTranslator, Ojc

public interface Translator


Nested Class Summary
static interface Translator.Log
           
 
Method Summary
 boolean canBuild(Storage store)
          canBuild is a predicate to find out if this translator can build the specified store (i.e.
 java.util.ArrayList getInputTypes()
          getInputTypes should return an array of 0 or more supported input types (currently the form is a string representing a file extension)
 java.lang.String getName()
          Translator name (i.e.
 java.util.ArrayList getOutputTypes()
          getOutputTypes should return an array of 0 or more supported output/generated type of files/stores (currently the form is a string representing a file extension)
 boolean needToBuild(Storage store)
          needToBuild is a predicate to find out if this translator needs the specified store to successfully build the other requested stores (i.e.
 void setLog(Translator.Log log)
           
 void setParameter(java.lang.String name, java.lang.String value)
           
 void setProject(Project project)
           
 int translate(Project prjNode, boolean rebuild, java.util.ArrayList sources, java.util.ArrayList results)
          Translate(), main entry point to the translator, the method will translate every specified files in 'sources' and all generated files will be returned in 'results'.
 void updateProject(Project project)
           
 

Method Detail

getName

java.lang.String getName()
Translator name (i.e. "Ojc")

Returns:
the name of the translator

getInputTypes

java.util.ArrayList getInputTypes()
getInputTypes should return an array of 0 or more supported input types (currently the form is a string representing a file extension)

Returns:
an array of 0 or more java.lang.String, can't be null

getOutputTypes

java.util.ArrayList getOutputTypes()
getOutputTypes should return an array of 0 or more supported output/generated type of files/stores (currently the form is a string representing a file extension)

Returns:
an array of 0 or more java.lang.String, can't be null

canBuild

boolean canBuild(Storage store)
canBuild is a predicate to find out if this translator can build the specified store (i.e. Ojc can't build a PL/SQL or JSP store).

Parameters:
store - Storage element to check
Returns:
true if this Translator can build this store else false

needToBuild

boolean needToBuild(Storage store)
needToBuild is a predicate to find out if this translator needs the specified store to successfully build the other requested stores (i.e. the SQLJ precompiler needs to have all .java files to build .sqlj files).

Parameters:
store - Storage element to check
Returns:
true if this Translator need this store to build other stores

setProject

void setProject(Project project)

updateProject

void updateProject(Project project)

setParameter

void setParameter(java.lang.String name,
                  java.lang.String value)

setLog

void setLog(Translator.Log log)

translate

int translate(Project prjNode,
              boolean rebuild,
              java.util.ArrayList sources,
              java.util.ArrayList results)
Translate(), main entry point to the translator, the method will translate every specified files in 'sources' and all generated files will be returned in 'results'.

Parameters:
prjNode - -- context to build with (classpath, sourcepath, output dir, ...)
rebuild - -- if true will unconditinally rebuild all sources
sources - -- a ArrayList of one or more Storage instance
results - -- a ArrayList of one or more Storage instance ** important ** all storage instances in results must point to newly generated files and may be deleted at any time during the build process
Returns:
the number of errors, 0 if successfull

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.