Package org.objectweb.asm.test
Enum AsmTest.PrecompiledClass
- java.lang.Object
-
- java.lang.Enum<AsmTest.PrecompiledClass>
-
- org.objectweb.asm.test.AsmTest.PrecompiledClass
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AsmTest.PrecompiledClass>
- Enclosing class:
- AsmTest
public static enum AsmTest.PrecompiledClass extends java.lang.Enum<AsmTest.PrecompiledClass>
A precompiled class, hand-crafted to contain some set of class file structures. These classes are not compiled as part of the build. Instead, they have been compiled beforehand, with the appropriate JDKs (including some now very hard to download and install).
-
-
Enum Constant Summary
-
Constructor Summary
Constructors Modifier Constructor Description private
PrecompiledClass(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes()
Returns the content of this class.java.lang.String
getInternalName()
Returns the internal name of this class.java.lang.String
getName()
Returns the fully qualified name of this class.boolean
isMoreRecentThan(AsmTest.Api api)
Returns true if this class was compiled with a JDK which is more recent than the given ASM API.boolean
isMoreRecentThanCurrentJdk()
Returns true if this class was compiled with a JDK which is more recent than the JDK used to run the tests.java.lang.String
toString()
static AsmTest.PrecompiledClass
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AsmTest.PrecompiledClass[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT_PACKAGE
public static final AsmTest.PrecompiledClass DEFAULT_PACKAGE
-
JDK3_ALL_INSTRUCTIONS
public static final AsmTest.PrecompiledClass JDK3_ALL_INSTRUCTIONS
-
JDK3_ALL_STRUCTURES
public static final AsmTest.PrecompiledClass JDK3_ALL_STRUCTURES
-
JDK3_ANONYMOUS_INNER_CLASS
public static final AsmTest.PrecompiledClass JDK3_ANONYMOUS_INNER_CLASS
-
JDK3_ARTIFICIAL_STRUCTURES
public static final AsmTest.PrecompiledClass JDK3_ARTIFICIAL_STRUCTURES
-
JDK3_INNER_CLASS
public static final AsmTest.PrecompiledClass JDK3_INNER_CLASS
-
JDK3_LARGE_METHOD
public static final AsmTest.PrecompiledClass JDK3_LARGE_METHOD
-
JDK5_ALL_INSTRUCTIONS
public static final AsmTest.PrecompiledClass JDK5_ALL_INSTRUCTIONS
-
JDK5_ALL_STRUCTURES
public static final AsmTest.PrecompiledClass JDK5_ALL_STRUCTURES
-
JDK5_ANNOTATION
public static final AsmTest.PrecompiledClass JDK5_ANNOTATION
-
JDK5_ENUM
public static final AsmTest.PrecompiledClass JDK5_ENUM
-
JDK5_LOCAL_CLASS
public static final AsmTest.PrecompiledClass JDK5_LOCAL_CLASS
-
JDK8_ALL_FRAMES
public static final AsmTest.PrecompiledClass JDK8_ALL_FRAMES
-
JDK8_ALL_INSTRUCTIONS
public static final AsmTest.PrecompiledClass JDK8_ALL_INSTRUCTIONS
-
JDK8_ALL_STRUCTURES
public static final AsmTest.PrecompiledClass JDK8_ALL_STRUCTURES
-
JDK8_ANONYMOUS_INNER_CLASS
public static final AsmTest.PrecompiledClass JDK8_ANONYMOUS_INNER_CLASS
-
JDK8_ARTIFICIAL_STRUCTURES
public static final AsmTest.PrecompiledClass JDK8_ARTIFICIAL_STRUCTURES
-
JDK8_INNER_CLASS
public static final AsmTest.PrecompiledClass JDK8_INNER_CLASS
-
JDK8_LARGE_METHOD
public static final AsmTest.PrecompiledClass JDK8_LARGE_METHOD
-
JDK9_MODULE
public static final AsmTest.PrecompiledClass JDK9_MODULE
-
JDK11_ALL_INSTRUCTIONS
public static final AsmTest.PrecompiledClass JDK11_ALL_INSTRUCTIONS
-
JDK11_ALL_STRUCTURES
public static final AsmTest.PrecompiledClass JDK11_ALL_STRUCTURES
-
JDK11_ALL_STRUCTURES_NESTED
public static final AsmTest.PrecompiledClass JDK11_ALL_STRUCTURES_NESTED
-
JDK14_ALL_STRUCTURES_RECORD
public static final AsmTest.PrecompiledClass JDK14_ALL_STRUCTURES_RECORD
-
JDK14_ALL_STRUCTURES_EMPTY_RECORD
public static final AsmTest.PrecompiledClass JDK14_ALL_STRUCTURES_EMPTY_RECORD
-
JDK15_ALL_STRUCTURES
public static final AsmTest.PrecompiledClass JDK15_ALL_STRUCTURES
-
-
Method Detail
-
values
public static AsmTest.PrecompiledClass[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AsmTest.PrecompiledClass c : AsmTest.PrecompiledClass.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AsmTest.PrecompiledClass valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
public java.lang.String getName()
Returns the fully qualified name of this class.- Returns:
- the fully qualified name of this class.
-
getInternalName
public java.lang.String getInternalName()
Returns the internal name of this class.- Returns:
- the internal name of this class.
-
isMoreRecentThan
public boolean isMoreRecentThan(AsmTest.Api api)
Returns true if this class was compiled with a JDK which is more recent than the given ASM API. For instance, returns true for a class compiled with the JDK 1.8 if the ASM API version is ASM4.- Parameters:
api
- an ASM API version.- Returns:
- whether this class was compiled with a JDK which is more recent than api.
-
isMoreRecentThanCurrentJdk
public boolean isMoreRecentThanCurrentJdk()
Returns true if this class was compiled with a JDK which is more recent than the JDK used to run the tests.- Returns:
- true if this class was compiled with the JDK9 and the current JDK version is strictly less than 9.
-
getBytes
public byte[] getBytes()
Returns the content of this class.- Returns:
- the content of this class.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<AsmTest.PrecompiledClass>
-
-