Class StaticInitMerger
java.lang.Object
org.objectweb.asm.ClassVisitor
org.objectweb.asm.commons.StaticInitMerger
public class StaticInitMerger
extends org.objectweb.asm.ClassVisitor
A
ClassVisitor that merges <clinit> methods into a single one. All the existing
<clinit> methods are renamed, and a new one is created, which calls all the renamed
methods.- Author:
- Eric Bruneton
-
Field Summary
Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStaticInitMerger(int api, String prefix, org.objectweb.asm.ClassVisitor classVisitor) Constructs a newStaticInitMerger.StaticInitMerger(String prefix, org.objectweb.asm.ClassVisitor classVisitor) Constructs a newStaticInitMerger. -
Method Summary
Methods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visitAnnotation, visitAttribute, visitField, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
-
Constructor Details
-
StaticInitMerger
Constructs a newStaticInitMerger. Subclasses must not use this constructor. Instead, they must use theStaticInitMerger(int, String, ClassVisitor)version.- Parameters:
prefix- the prefix to use to rename the existing <clinit> methods.classVisitor- the class visitor to which this visitor must delegate method calls. May be null.
-
StaticInitMerger
Constructs a newStaticInitMerger.- Parameters:
api- the ASM API version implemented by this visitor. Must be one of theASMx values inOpcodes.prefix- the prefix to use to rename the existing <clinit> methods.classVisitor- the class visitor to which this visitor must delegate method calls. May be null.
-
-
Method Details
-
visit
-
visitMethod
-
visitEnd
public void visitEnd()- Overrides:
visitEndin classorg.objectweb.asm.ClassVisitor
-