gate.util.compilers
Class Eclipse
java.lang.Object
gate.util.Javac
gate.util.compilers.Eclipse
- All Implemented Interfaces:
- GateConstants
public class Eclipse
- extends Javac
This class copiles a set of java sources using the JDT compiler from the
Eclipse project. Unlike the Sun compiler, this compiler can load
dependencies directly from the GATE class loader, which (a) makes it faster,
(b) means the compiler will work when GATE is loaded from a classloader
other than the system classpath (for example within a Tomcat web
application), and (c) allows it to compile code that depends on classes
defined in CREOLE plugins, as well as in the GATE core. This is the default
compiler for GATE version 3.0.
- Author:
- Ian Roberts
Fields inherited from interface gate.GateConstants |
ABOUT_URL_JAVA_PROPERTY_NAME, ANNOT_TYPE_TO_EXPORT, APP_ICON_JAVA_PROPERTY_NAME, APP_SPLASH_JAVA_PROPERTY_NAME, APPLICATION_JAVA_PROPERTY_NAME, AUTOLOAD_PLUGIN_PATH_KEY, AUTOLOAD_PLUGIN_PATH_PROPERTY_NAME, COMPILER_TYPE_KEY, CORPUS_INDEX_DEFINITION_FEATURE_KEY, CORPUS_INDEX_STATISTICS_FEATURE_KEY, DOCEDIT_INSERT_APPEND, DOCEDIT_INSERT_PREPEND, DOCUMENT_ADD_SPACE_ON_UNPACK_FEATURE_NAME, DOCUMENT_NEW_LINE_TYPE, DOCUMENT_REPOSITIONING_INFO_FEATURE_NAME, GATE_CONFIG_PROPERTY, GATE_DOT_SER, GATE_DOT_XML, GATE_HOME_PROPERTY_NAME, GATE_SITE_CONFIG_PROPERTY_NAME, GATE_USER_CONFIG_PROPERTY_NAME, KNOWN_PLUGIN_PATH_KEY, LAST_FILECHOOSER_LOCATION, LOOK_AND_FEEL, MAIN_FRAME_HEIGHT, MAIN_FRAME_WIDTH, MENUS_FONT, ORIGINAL_DOCUMENT_CONTENT_FEATURE_NAME, ORIGINAL_MARKUPS_ANNOT_SET_NAME, OTHER_COMPONENTS_FONT, PLUGINS, PLUGINS_HOME_PROPERTY_NAME, SAVE_FEATURES_WHEN_PRESERVING_FORMAT, SAVE_OPTIONS_ON_EXIT, SAVE_SESSION_ON_EXIT, SITE_CONFIG_PROPERTY_NAME, TEXT_COMPONENTS_FONT, THROWEX_FORMAT_PROPERTY_NAME, TITLE_JAVA_PROPERTY_NAME, USER_CONFIG_PROPERTY_NAME, WORDNET_CONFIG_FILE |
Method Summary |
void |
compile(Map sources)
Compiles a set of java sources using the Eclipse Java compiler and loads
the compiled classes in the gate class loader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Eclipse
public Eclipse()
compile
public void compile(Map sources)
throws GateException
- Compiles a set of java sources using the Eclipse Java compiler and loads
the compiled classes in the gate class loader.
- Specified by:
compile
in class Javac
- Parameters:
sources
- a map from fully qualified classname to java source
- Throws:
GateException
- in case of a compilation error or warning.
In the case of warnings the compiled classes are loaded before the error is
raised.