下面列出了org.objectweb.asm.Opcodes# ASM7 ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Inject
public EntityScanner(EbeanClassRegistry registry, ModuleManager moduleManager) {
super(Opcodes.ASM7);
this.registry = registry;
this.moduleManager = moduleManager;
}
/**
* @param cw A class writer that is wrapped by this class adapter
* @param original the original bytecode
* @param className the name of the class being examined.
*/
public VerifyingClassAdapter(ClassWriter cw, byte[] original, String className) {
super(Opcodes.ASM7, cw);
state = State.UNKNOWN;
message = "The class has not finished being examined";
this.cw = cw;
this.original = original;
this.className = className.replace('/', '.');
}
private MethodSignatureVisitor(String name, MethodSignatureVisitor parent) {
super(Opcodes.ASM7);
final EntryMessage message = log.traceEntry("name={}", name);
this.name = name;
this.parent = parent;
this.classTypeParameters = parent.classTypeParameters;
this.typeMap = parent.typeMap;
log.traceExit(message);
}
/**
* Constructs a new {@link SignatureVisitor}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
*/
public SignatureVisitor(final int api) {
if (api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 && api != Opcodes.ASM7) {
throw new IllegalArgumentException();
}
this.api = api;
}
/**
* Constructs an uninitialized {@link MethodNode}. <i>Subclasses must not use this
* constructor</i>. Instead, they must use the {@link #MethodNode(int)} version.
*
* @throws IllegalStateException If a subclass calls this constructor.
*/
public MethodNode() {
this(Opcodes.ASM7);
if (getClass() != MethodNode.class) {
throw new IllegalStateException();
}
}
/**
* Constructs a new {@link ASMifier}. <i>Subclasses must not use this constructor</i>. Instead,
* they must use the {@link #ASMifier(int, String, int)} version.
*
* @throws IllegalStateException If a subclass calls this constructor.
*/
public ASMifier() {
this(Opcodes.ASM7, "classWriter", 0);
if (getClass() != ASMifier.class) {
throw new IllegalStateException();
}
}
public CCMFieldVisitor(final FieldVisitor fv, String name, String desc) {
super(Opcodes.ASM7,fv);
this.name = name;
this.desc = desc;
}
/**
* Returns the latest stable ASM API value in {@link Opcodes}.
*/
static int value() {
return Opcodes.ASM7;
}
private RefClassFieldMapper( ClassWriter cv, String className, HashMap<String, FieldMirror> fields) {
super(Opcodes.ASM7, cv);
this.className=className;
this.fields=fields;
}
public FirstOrderFieldVisitor(FirstOrderVisitorContext context) {
super(Opcodes.ASM7);
mContext = context;
// Unused by dexopt: mBuilder = context.builder;
}
private OffHeapAugmentor( ClassWriter cv) {
super(Opcodes.ASM7, cv);
}
public ArquillianClientAnnotationSeekingClassVisitor() {
super(Opcodes.ASM7);
}
public DependencyClassVisitor(DependencyAcceptor acceptor) {
super(Opcodes.ASM7);
this.acceptor = acceptor;
this.signatureVisitor = createSignatureVisitor();
this.annotationVisitor = createAnnotationVisitor();
}
TestVisitor(String name) {
super(Opcodes.ASM7);
this.name = name;
}
public StripVerifyingVisitor() {
super(Opcodes.ASM7);
}
/**
* Constructs a new {@link AnalyzerAdapter}. <i>Subclasses must not use this constructor</i>.
* Instead, they must use the {@link #AnalyzerAdapter(int, String, int, String, String,
* MethodVisitor)} version.
*
* @param owner the owner's class name.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
* @param descriptor the method's descriptor (see {@link Type}).
* @param methodVisitor the method visitor to which this adapter delegates calls. May be {@literal
* null}.
* @throws IllegalStateException If a subclass calls this constructor.
*/
public AnalyzerAdapter(
final String owner,
final int access,
final String name,
final String descriptor,
final MethodVisitor methodVisitor) {
this(Opcodes.ASM7, owner, access, name, descriptor, methodVisitor);
if (getClass() != AnalyzerAdapter.class) {
throw new IllegalStateException();
}
}
/**
* Constructs a new {@link InstructionAdapter}. <i>Subclasses must not use this constructor</i>.
* Instead, they must use the {@link #InstructionAdapter(int, MethodVisitor)} version.
*
* @param methodVisitor the method visitor to which this adapter delegates calls.
* @throws IllegalStateException If a subclass calls this constructor.
*/
public InstructionAdapter(final MethodVisitor methodVisitor) {
this(Opcodes.ASM7, methodVisitor);
if (getClass() != InstructionAdapter.class) {
throw new IllegalStateException();
}
}
/**
* Constructs a new {@link GeneratorAdapter}. <i>Subclasses must not use this constructor</i>.
* Instead, they must use the {@link #GeneratorAdapter(int, MethodVisitor, int, String, String)}
* version.
*
* @param methodVisitor the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
* @param descriptor the method's descriptor (see {@link Type}).
* @throws IllegalStateException if a subclass calls this constructor.
*/
public GeneratorAdapter(
final MethodVisitor methodVisitor,
final int access,
final String name,
final String descriptor) {
this(Opcodes.ASM7, methodVisitor, access, name, descriptor);
if (getClass() != GeneratorAdapter.class) {
throw new IllegalStateException();
}
}
/**
* Constructs a new {@link TraceFieldVisitor}.
*
* @param fieldVisitor the field visitor to which to delegate calls. May be {@literal null}.
* @param printer the printer to convert the visited field into text.
*/
public TraceFieldVisitor(final FieldVisitor fieldVisitor, final Printer printer) {
super(Opcodes.ASM7, fieldVisitor);
this.p = printer;
}
/**
* Constructs a new {@link ASMifier}.
*
* @param visitorVariableName the name of the visitor variable in the produced code.
* @param annotationVisitorId identifier of the annotation visitor variable in the produced code.
* @return a new {@link ASMifier}.
*/
// DontCheck(AbbreviationAsWordInName): can't be renamed (for backward binary compatibility).
protected ASMifier createASMifier(
final String visitorVariableName, final int annotationVisitorId) {
return new ASMifier(Opcodes.ASM7, visitorVariableName, annotationVisitorId);
}