java.lang.Object
de.grogra.xl.compiler.CompilerOptions
- All Implemented Interfaces:
Cloneable
This class contains the set of all compiler options.
- Author:
- Ole Kniemeyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanCompiler 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.booleanCompiler 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.booleanCompiler 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.booleanCompiler 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.static final booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final Stringstatic final intstatic final booleanstatic final booleanstatic final booleanstatic final String[]static final booleanstatic final booleanstatic final intThe default package name to use.booleanCompiler option: if true any conversion function needs to be annotated with @Autoconversion.intSelect the target JVM compatibility.booleanbooleanbooleanstatic final intstatic final intstatic final intstatic final intstatic final intbooleanXL 1.6U diagnostic toggle for concrete fix hints.booleanXL 1.6U diagnostic toggle for normalized/base-unit detail output.booleanXL 1.6U runtime range handling mode.String[]XL 1.6U project/session unit definitions, e.g.booleanXL 1.6U diagnostic toggle for foreign Java physical-boundary calls.intXL 1.6U warning detail level.booleanXL 1.6U diagnostic toggle for preferred-unit mismatch diagnostics.intSelected XL compiler route. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleansupportsVersion(int ver) Returns true if the specified version number designates a version of the JVM that is compatible with the target version currently set.
-
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
- 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
-
javaVersion
public int javaVersionSelect 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 allowConversionWithStaticValueOfCompiler 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 allowConversionWithStaticToXCompiler 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 allowConversionWithToXCompiler 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 allowConversionWithCtorCompiler 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 enableAutoconversionAnnotationCompiler 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
The default package name to use. -
xlCompilerVersion
public int xlCompilerVersionSelected XL compiler route. -
xl16uWarningLevel
public int xl16uWarningLevelXL 1.6U warning detail level. -
xl16uStrictRuntimeRangeHandling
public boolean xl16uStrictRuntimeRangeHandlingXL 1.6U runtime range handling mode. -
xl16uWarnForeignJavaBoundaryCalls
public boolean xl16uWarnForeignJavaBoundaryCallsXL 1.6U diagnostic toggle for foreign Java physical-boundary calls. -
xl16uWarnPreferredUnitMismatch
public boolean xl16uWarnPreferredUnitMismatchXL 1.6U diagnostic toggle for preferred-unit mismatch diagnostics. -
xl16uShowNormalizedUnitDetails
public boolean xl16uShowNormalizedUnitDetailsXL 1.6U diagnostic toggle for normalized/base-unit detail output. -
xl16uShowFixHints
public boolean xl16uShowFixHintsXL 1.6U diagnostic toggle for concrete fix hints. -
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:
trueiffveris supported by the currently set version
-