Class ProbingClassWriter
java.lang.Object
org.objectweb.asm.ClassVisitor
codes.rafael.asmjdkbridge.ProbingClassWriter
public class ProbingClassWriter
extends org.objectweb.asm.ClassVisitor
A class writer that automatically resolves a suitable writer, either based on ASM (if ASM officially
supports a class file version) or a JDK Class File API based implementation.
-
Field Summary
Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv -
Constructor Summary
ConstructorsConstructorDescriptionProbingClassWriter(int flags) Creates a class writer.ProbingClassWriter(int flags, Method getSuperClass, Object target) Creates a class writer.ProbingClassWriter(int flags, Function<String, String> getSuperClass) Creates a class writer. -
Method Summary
Methods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitMethod, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
-
Constructor Details
-
ProbingClassWriter
public ProbingClassWriter(int flags) Creates a class writer.- Parameters:
flags- The ASM flags to consider.
-
ProbingClassWriter
Creates a class writer.- Parameters:
flags- The ASM flags to consider.getSuperClass- A resolver for the supplied internal class name's internal super class name. If a class is an interface,nullshould be returned. As a method to allow pre-Java 8 code to call this constructor via reflection.target- The target to invoke the reflective method on.
-
ProbingClassWriter
-
-
Method Details
-
visit
-
toByteArray
public byte[] toByteArray()Returns the generated class file.- Returns:
- The class file as a byte array.
-