Module xl.compiler

Class CompilerOptions

java.lang.Object
de.grogra.xl.compiler.CompilerOptions
All Implemented Interfaces:
Cloneable

public final class CompilerOptions extends Object implements Cloneable
This class contains the set of all compiler options.
Author:
Ole Kniemeyer
  • Field Details

    • XL_12

      public static final int XL_12
      See Also:
    • XL_16U

      public static final int XL_16U
      See Also:
    • XL16U_WARNING_OFF

      public static final int XL16U_WARNING_OFF
      See Also:
    • XL16U_WARNING_DEFAULT

      public static final int XL16U_WARNING_DEFAULT
      See Also:
    • XL16U_WARNING_VERBOSE

      public static final int XL16U_WARNING_VERBOSE
      See Also:
    • DEFAULT_D2F_IS_WIDENING

      public static final boolean DEFAULT_D2F_IS_WIDENING
      See Also:
    • DEFAULT_ALLOW_CONVERSION_WITH_STATIC_VALUEOF

      public static final boolean DEFAULT_ALLOW_CONVERSION_WITH_STATIC_VALUEOF
      See Also:
    • DEFAULT_ALLOW_CONVERSION_WITH_STATIC_TOX

      public static final boolean DEFAULT_ALLOW_CONVERSION_WITH_STATIC_TOX
      See Also:
    • DEFAULT_ALLOW_CONVERSION_WITH_TOX

      public static final boolean DEFAULT_ALLOW_CONVERSION_WITH_TOX
      See Also:
    • DEFAULT_ALLOW_CONVERSION_WITH_CTOR

      public static final boolean DEFAULT_ALLOW_CONVERSION_WITH_CTOR
      See Also:
    • DEFAULT_ENABLE_AUTOCONVERSION_ANNOTATION

      public static final boolean DEFAULT_ENABLE_AUTOCONVERSION_ANNOTATION
      See Also:
    • DEFAULT_NAME_DEFAULT_PACKAGE

      public static final String DEFAULT_NAME_DEFAULT_PACKAGE
      See Also:
    • DEFAULT_XL_COMPILER_VERSION

      public static final int DEFAULT_XL_COMPILER_VERSION
      See Also:
    • DEFAULT_XL16U_WARNING_LEVEL

      public static final int DEFAULT_XL16U_WARNING_LEVEL
      See Also:
    • DEFAULT_XL16U_STRICT_RUNTIME_RANGE_HANDLING

      public static final boolean DEFAULT_XL16U_STRICT_RUNTIME_RANGE_HANDLING
      See Also:
    • DEFAULT_XL16U_WARN_FOREIGN_JAVA_BOUNDARY_CALLS

      public static final boolean DEFAULT_XL16U_WARN_FOREIGN_JAVA_BOUNDARY_CALLS
      See Also:
    • DEFAULT_XL16U_WARN_PREFERRED_UNIT_MISMATCH

      public static final boolean DEFAULT_XL16U_WARN_PREFERRED_UNIT_MISMATCH
      See Also:
    • DEFAULT_XL16U_SHOW_NORMALIZED_UNIT_DETAILS

      public static final boolean DEFAULT_XL16U_SHOW_NORMALIZED_UNIT_DETAILS
      See Also:
    • DEFAULT_XL16U_SHOW_FIX_HINTS

      public static final boolean DEFAULT_XL16U_SHOW_FIX_HINTS
      See Also:
    • DEFAULT_XL16U_USER_UNIT_DEFINITIONS

      public static final String[] DEFAULT_XL16U_USER_UNIT_DEFINITIONS
    • javaVersion

      public int javaVersion
      Select the target JVM compatibility. A compiler switch allows to select another value for this switch, the default is JDK1.4 compatibility. An example where this switch influences bytecode generation: In java.lang.Integer the conversion of an int to Integer is only possible by creating a new instance of Integer for Java 1.4. Since Java 1.5 the class java.lang.Integer also contains a static method valueOf(int), which is a better choice for that conversion.
    • allowConversionWithStaticValueOf

      public boolean allowConversionWithStaticValueOf
      Compiler option: if true any function of the type 'static B valueOf(A)' in the current scope is used to implicitly perform autoconversion from type A to type B. Note: since the return type is not part of a method's signature, having multiple valueOf-functions may be ambigous.
    • allowConversionWithStaticToX

      public boolean allowConversionWithStaticToX
      Compiler option: if true any function of the type 'static B toB(A)' in the current scope is used to implicitly perform autoconversion from type A to type B.
    • allowConversionWithToX

      public boolean allowConversionWithToX
      Compiler option: if true any function of the type 'B A.valueOf()' in the current scope is used to implicitly perform autoconversion from type A to type B. The function is called on an instance of type A.
    • allowConversionWithCtor

      public boolean allowConversionWithCtor
      Compiler option: if true any function of the type 'B(A)' in the current scope is used to implicitly perform autoconversion from type A to type B. This is equivalent to creating a new instance via 'new B(a)', where a is of type A.
    • enableAutoconversionAnnotation

      public boolean enableAutoconversionAnnotation
      Compiler option: if true any conversion function needs to be annotated with @Autoconversion.
      See Also:
    • sourceInfo

      public boolean sourceInfo
    • lineNumberInfo

      public boolean lineNumberInfo
    • localInfo

      public boolean localInfo
    • defaultpackagename

      public String defaultpackagename
      The default package name to use.
    • xlCompilerVersion

      public int xlCompilerVersion
      Selected XL compiler route.
    • xl16uWarningLevel

      public int xl16uWarningLevel
      XL 1.6U warning detail level.
    • xl16uStrictRuntimeRangeHandling

      public boolean xl16uStrictRuntimeRangeHandling
      XL 1.6U runtime range handling mode.
    • xl16uWarnForeignJavaBoundaryCalls

      public boolean xl16uWarnForeignJavaBoundaryCalls
      XL 1.6U diagnostic toggle for foreign Java physical-boundary calls.
    • xl16uWarnPreferredUnitMismatch

      public boolean xl16uWarnPreferredUnitMismatch
      XL 1.6U diagnostic toggle for preferred-unit mismatch diagnostics.
    • xl16uShowNormalizedUnitDetails

      public boolean xl16uShowNormalizedUnitDetails
      XL 1.6U diagnostic toggle for normalized/base-unit detail output.
    • xl16uShowFixHints

      public boolean xl16uShowFixHints
      XL 1.6U diagnostic toggle for concrete fix hints.
    • xl16uUserUnitDefinitions

      public String[] xl16uUserUnitDefinitions
      XL 1.6U project/session unit definitions, e.g. leaf = 2.5 cm.
  • Constructor Details

    • CompilerOptions

      public CompilerOptions()
  • Method Details

    • supportsVersion

      public boolean supportsVersion(int ver)
      Returns true if the specified version number designates a version of the JVM that is compatible with the target version currently set. Valid values for the version number are the constants in org.objectweb.asm.Opcodes.V* For instance a call supportsVersion(Opcodes.V1_4) with Opcodes.V1_4 currently set as target would return true. The same call with Opcodes.V1_3 set as target would return false.
      Parameters:
      ver - version to compare
      Returns:
      true iff ver is supported by the currently set version