## org.eclipse.jet.core.compiler
Class JETCompilerOptions

    java.lang.Object
      org.eclipse.jet.core.compiler.JETCompilerOptions

    public final class JETCompilerOptions

extends java.lang.Object

Utility class representing JET compiler Options

Field Summary
`static java.lang.String` `DEFAULT_COMPILED_TEMPLATE_PACKAGE` The default value of the `OPTION_COMPILED_TEMPLATE_PACKAGE` option; value: "org.eclipse.jet2.internal.compiled".
`static java.lang.String` `DEFAULT_COMPILED_TEMPLATE_SRC_DIR` The default value of the `OPTION_COMPILED_TEMPLATE_SRC_DIR` option; value: "jet2java".
`static java.lang.Integer` `DEFAULT_JET_SPECIFICATION_VERSION` Default value for `OPTION_JET_SPECIFICATION_VERSION`.
`static java.lang.Boolean` `DEFAULT_SET_JAVA_FILES_AS_DERIVED` The default value of the `OPTION_SET_JAVA_FILES_AS_DERIVED` option (Boolean.TRUE).
`static java.lang.String` `DEFAULT_TEMPLATE_EXT` The default value of the `OPTION_TEMPLATE_EXT` option; value: "jet".
`static java.lang.String` `DEFAULT_V1_BASE_TRANSFORMATION` Default value for `OPTION_V1_BASE_TRANSFORMATION`.
`static java.lang.Boolean` `DEFAULT_V1_COMPILE_BASE_TEMPLATES` Default value for `OPTION_V1_COMPILE_BASE_TEMPLATES`; value: `Boolean.FALSE`.
`static java.lang.String` `DEFAULT_V1_TEMPLATES_DIR` Default value for `OPTION_V1_TEMPLATES_DIR`; value ""templates".
`static java.lang.String` `OPTION_COMPILED_TEMPLATE_PACKAGE` Compiler option specifying the package to which compiled templates are written; value: "compiledTemplatePackage".
`static java.lang.String` `OPTION_COMPILED_TEMPLATE_SRC_DIR` Compiler option specifying the Java project source directory to which compiled templates are written; value: "compiledTemplateSrcDir".
`static java.lang.String` `OPTION_JET_SPECIFICATION_VERSION` Compiler option specifying which JET specification version to compile; value "jetSpecificationVersion".
`static java.lang.String` `OPTION_SET_JAVA_FILES_AS_DERIVED` Compiler option specifying whether generated Java source should be marked as 'derived'.
`static java.lang.String` `OPTION_TEMPLATE_EXT` Compiler option specifying which extensions are recognized as extensions; value: "templateExt".
`static java.lang.String` `OPTION_V1_BASE_TRANSFORMATION` Compiler option specifying the base locations for JET1 templates to override; value ""org.eclipse.jet.v1BaseTransformationID"".
`static java.lang.String` `OPTION_V1_COMPILE_BASE_TEMPLATES` Compiler option specifying whether all base templates are recompiled into the current project; value ""org.eclipse.jet.v1CompileBaseTemplates"".
`static java.lang.String` `OPTION_V1_TEMPLATES_DIR` Compiler option specifying the project relative location of JET V1 templates.

Method Summary
`static boolean` `getBooleanOption(java.util.Map options, java.lang.String key)` Return the value of a boolean option, or the default value of the option if not specified in the pass options map
`static java.util.Map` `getDefaultCompilerOptions()` Return the default compiler options
`static int` `getIntOption(java.util.Map options, java.lang.String key)` Return the value of an integer option, or the default value of the option if not specified in the pass options map
`static java.lang.String` `getStringOption(java.util.Map options, java.lang.String key)` Return the value of a string option, or the default value of the option if not specified in the pass options map

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_COMPILED_TEMPLATE_PACKAGE

    public static final java.lang.String DEFAULT_COMPILED_TEMPLATE_PACKAGE

  The default value of the `OPTION_COMPILED_TEMPLATE_PACKAGE` option; value: "org.eclipse.jet2.internal.compiled".

  See Also:
    Constant Field Values

### DEFAULT_COMPILED_TEMPLATE_SRC_DIR

    public static final java.lang.String DEFAULT_COMPILED_TEMPLATE_SRC_DIR

  The default value of the `OPTION_COMPILED_TEMPLATE_SRC_DIR` option; value: "jet2java".

  See Also:
    Constant Field Values

### DEFAULT_TEMPLATE_EXT

    public static final java.lang.String DEFAULT_TEMPLATE_EXT

  The default value of the `OPTION_TEMPLATE_EXT` option; value: "jet".

  See Also:
    Constant Field Values

### DEFAULT_SET_JAVA_FILES_AS_DERIVED

    public static final java.lang.Boolean DEFAULT_SET_JAVA_FILES_AS_DERIVED

  The default value of the `OPTION_SET_JAVA_FILES_AS_DERIVED` option (Boolean.TRUE).

### OPTION_COMPILED_TEMPLATE_PACKAGE

    public static final java.lang.String OPTION_COMPILED_TEMPLATE_PACKAGE

  Compiler option specifying the package to which compiled templates are written; value: "compiledTemplatePackage".

  See Also:
    Constant Field Values

### OPTION_COMPILED_TEMPLATE_SRC_DIR

    public static final java.lang.String OPTION_COMPILED_TEMPLATE_SRC_DIR

  Compiler option specifying the Java project source directory to which compiled templates are written; value: "compiledTemplateSrcDir".

  See Also:
    Constant Field Values

### OPTION_TEMPLATE_EXT

    public static final java.lang.String OPTION_TEMPLATE_EXT

  Compiler option specifying which extensions are recognized as extensions; value: "templateExt".

  See Also:
    Constant Field Values

### OPTION_SET_JAVA_FILES_AS_DERIVED

    public static final java.lang.String OPTION_SET_JAVA_FILES_AS_DERIVED

  Compiler option specifying whether generated Java source should be marked as 'derived'.

  See Also:
    Constant Field Values

### OPTION_JET_SPECIFICATION_VERSION

    public static final java.lang.String OPTION_JET_SPECIFICATION_VERSION

  Compiler option specifying which JET specification version to compile; value "jetSpecificationVersion".

  See Also:
    Constant Field Values

### DEFAULT_JET_SPECIFICATION_VERSION

    public static final java.lang.Integer DEFAULT_JET_SPECIFICATION_VERSION

  Default value for `OPTION_JET_SPECIFICATION_VERSION`.

### OPTION_V1_BASE_TRANSFORMATION

    public static final java.lang.String OPTION_V1_BASE_TRANSFORMATION

  Compiler option specifying the base locations for JET1 templates to override; value ""org.eclipse.jet.v1BaseTransformationID"". Use of this option is discouraged, along with the <%@ include %> directive.

  This option is not set globally. It is only set at the project level.

  See Also:
    Constant Field Values

### DEFAULT_V1_BASE_TRANSFORMATION

    public static final java.lang.String DEFAULT_V1_BASE_TRANSFORMATION

  Default value for `OPTION_V1_BASE_TRANSFORMATION`.

  See Also:
    Constant Field Values

### OPTION_V1_COMPILE_BASE_TEMPLATES

    public static final java.lang.String OPTION_V1_COMPILE_BASE_TEMPLATES

  Compiler option specifying whether all base templates are recompiled into the current project; value ""org.eclipse.jet.v1CompileBaseTemplates"". Use this option when `OPTION_V1_BASE_TRANSFORMATION` is not empty to cause all base templates to be overriden. This will be necessary if base templates use <%@ include %> directives that the current project overrides.

  See Also:
    Constant Field Values

### DEFAULT_V1_COMPILE_BASE_TEMPLATES

    public static final java.lang.Boolean DEFAULT_V1_COMPILE_BASE_TEMPLATES

  Default value for `OPTION_V1_COMPILE_BASE_TEMPLATES`; value: `Boolean.FALSE`.

### OPTION_V1_TEMPLATES_DIR

    public static final java.lang.String OPTION_V1_TEMPLATES_DIR

  Compiler option specifying the project relative location of JET V1 templates.

  See Also:
    Constant Field Values

### DEFAULT_V1_TEMPLATES_DIR

    public static final java.lang.String DEFAULT_V1_TEMPLATES_DIR

  Default value for `OPTION_V1_TEMPLATES_DIR`; value ""templates".

  See Also:
    Constant Field Values

Method Detail

### getDefaultCompilerOptions

    public static java.util.Map getDefaultCompilerOptions()

  Return the default compiler options

  Returns:
    an unmodifiable map containing the default compiler options (keys) and their default values
  See Also:
    `OPTION_COMPILED_TEMPLATE_PACKAGE`, `OPTION_COMPILED_TEMPLATE_SRC_DIR`, `OPTION_SET_JAVA_FILES_AS_DERIVED`, `OPTION_TEMPLATE_EXT`

### getStringOption

    public static java.lang.String getStringOption(java.util.Map options,
                                                   java.lang.String key)

  Return the value of a string option, or the default value of the option if not specified in the pass options map

  Parameters:
    `options` - a compiler options map
    `key` - a compiler option key
  Returns:
    the option value or default value
  Throws:
    `java.lang.NullPointerException` - if `options` or `key` is `null`
    `java.lang.IllegalArgumentException` - if `key` is not a know compiler option

### getBooleanOption

    public static boolean getBooleanOption(java.util.Map options,
                                           java.lang.String key)

  Return the value of a boolean option, or the default value of the option if not specified in the pass options map

  Parameters:
    `options` - a compiler options map
    `key` - a compiler option key
  Returns:
    the option value or default value
  Throws:
    `java.lang.NullPointerException` - if `options` or `key` is `null`
    `java.lang.IllegalArgumentException` - if `key` is not a know compiler option

### getIntOption

    public static int getIntOption(java.util.Map options,
                                   java.lang.String key)

  Return the value of an integer option, or the default value of the option if not specified in the pass options map

  Parameters:
    `options` - a compiler options map
    `key` - a compiler option key
  Returns:
    the option value or default value
  Throws:
    `java.lang.NullPointerException` - if `options` or `key` is `null`
    `java.lang.IllegalArgumentException` - if `key` is not a know compiler option

Copyright 2006 IBM Corporation and others. All Rights Reserved.