/** * Beginning in -target 6, we generate stack map attribute in * compact format. */ public boolean generateStackMapTable() { return compareTo(JDK1_6) >= 0; }
/** * Does the VM have direct support for class literals? */ public boolean hasClassLiterals() { return compareTo(JDK1_5) >= 0; }
/** * For bootstrapping, we use J2SE1.4's java.util.Collection * instead of java.lang.Iterable. */ public boolean hasIterable() { return compareTo(JDK1_5) >= 0; }
/** * Beginning with -target 1.2 we obey the JLS rules for binary * compatibility, emitting as the qualifying type of a reference * to a method or field the type of the qualifier. In earlier * targets we use as the qualifying type the class in which the * member was found. The following methods named * *binaryCompatibility() indicate places where we vary from this * general rule. */ public boolean obeyBinaryCompatibility() { return compareTo(JDK1_2) >= 0; }
/** * Beginning in -target 6, package-info classes are marked synthetic. */ public boolean isPackageInfoSynthetic() { return compareTo(JDK1_6) >= 0; }
/** * Although we may not have support for class literals, should we * avoid initializing the class that the literal refers to? * See 4468823 */ public boolean classLiteralsNoInit() { return compareTo(JDK1_5) >= 0; }
/** * Starting in 1.5, the compiler uses an array type as * the qualifier for method calls (such as clone) where required by * the language and VM spec. Earlier versions of the compiler * qualified them by Object. */ public boolean arrayBinaryCompatibility() { return compareTo(JDK1_5) >= 0; }
/** * Does the VM support an invokedynamic instruction? */ public boolean hasInvokedynamic() { return compareTo(JDK1_7) >= 0; }
/** * In -target 1.1 and earlier, the compiler is required to emit * synthetic method definitions in abstract classes for interface * methods that are not overridden. We call them "Miranda" methods. */ public boolean requiresIProxy() { return compareTo(JDK1_1) <= 0; }
/** * Beginning after 1.2, we follow the binary compatibility rules for * interface fields. The 1.2 VMs had bugs handling interface fields * when compiled using binary compatibility (see 4400598), so this is * an accommodation to them. */ public boolean interfaceFieldsBinaryCompatibility() { return compareTo(JDK1_2) > 0; }
/** * Beginning in -target 6, package-info classes are marked synthetic. */ public boolean isPackageInfoSynthetic() { return compareTo(JDK1_6) >= 0; }
/** * Beginning in 1.5, we have an unsynchronized version of * StringBuffer called StringBuilder that can be used by the * compiler for string concatenation. */ public boolean useStringBuilder() { return compareTo(JDK1_5) >= 0; }
/** * Beginning in 1.5, we have flag bits we can use instead of * marker attributes. */ public boolean useSyntheticFlag() { return compareTo(JDK1_5) >= 0; }
/** * Does the VM support an invokedynamic instruction? */ public boolean hasInvokeDynamic() { return compareTo(JDK1_7) >= 0; }
/** * In J2SE1.5.0, we introduced the "EnclosingMethod" attribute * for improved reflection support. */ public boolean hasEnclosingMethodAttribute() { return compareTo(JDK1_5) >= 0; } }
/** * Beginning after 1.2, we follow the binary compatibility rules for * interface fields. The 1.2 VMs had bugs handling interface fields * when compiled using binary compatibility (see 4400598), so this is * an accommodation to them. */ public boolean interfaceFieldsBinaryCompatibility() { return compareTo(JDK1_2) > 0; }
/** * Beginning in -target 6, we generate stack map attribute in * compact format. */ public boolean generateStackMapTable() { return compareTo(JDK1_6) >= 0; }
/** * Although we may not have support for class literals, when we * throw a NoClassDefFoundError, should we initialize its cause? */ public boolean hasInitCause() { return compareTo(JDK1_4) >= 0; }
/** * In J2SE1.5.0, we introduced the "EnclosingMethod" attribute * for improved reflection support. */ public boolean hasEnclosingMethodAttribute() { return compareTo(JDK1_5) >= 0; } }
/** * In J2SE1.5.0, we introduced the "EnclosingMethod" attribute * for improved reflection support. */ public boolean hasEnclosingMethodAttribute() { return compareTo(JDK1_5) >= 0; } }