Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.objectweb.asm;
- public abstract class ClassVisitor {
- protected final int api;
- protected ClassVisitor cv;
- public ClassVisitor(int api) {
- this(api, (ClassVisitor) null);
- }
- public ClassVisitor(int api, ClassVisitor classVisitor) {
- this.api = api;
- this.cv = classVisitor;
- }
- public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
- if (this.cv != null) {
- this.cv.visit(version, access, name, signature, superName, interfaces);
- }
- }
- public void visitSource(String source, String debug) {
- if (this.cv != null) {
- this.cv.visitSource(source, debug);
- }
- }
- public ModuleVisitor visitModule(String name, int access, String version) {
- if (this.api < 393216) {
- throw new UnsupportedOperationException();
- } else {
- return this.cv != null ? this.cv.visitModule(name, access, version) : null;
- }
- }
- @Deprecated
- public void visitNestHostExperimental(String nestHost) {
- if (this.cv != null) {
- this.cv.visitNestHostExperimental(nestHost);
- }
- }
- public void visitOuterClass(String owner, String name, String descriptor) {
- if (this.cv != null) {
- this.cv.visitOuterClass(owner, name, descriptor);
- }
- }
- public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
- return this.cv != null ? this.cv.visitAnnotation(descriptor, visible) : null;
- }
- public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
- return this.cv != null ? this.cv.visitTypeAnnotation(typeRef, typePath, descriptor, visible) : null;
- }
- public void visitAttribute(Attribute attribute) {
- if (this.cv != null) {
- this.cv.visitAttribute(attribute);
- }
- }
- @Deprecated
- public void visitNestMemberExperimental(String nestMember) {
- if (this.cv != null) {
- this.cv.visitNestMemberExperimental(nestMember);
- }
- }
- public void visitInnerClass(String name, String outerName, String innerName, int access) {
- if (this.cv != null) {
- this.cv.visitInnerClass(name, outerName, innerName, access);
- }
- }
- public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
- return this.cv != null ? this.cv.visitField(access, name, descriptor, signature, value) : null;
- }
- public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {
- return this.cv != null ? this.cv.visitMethod(access, name, descriptor, signature, exceptions) : null;
- }
- public void visitEnd() {
- if (this.cv != null) {
- this.cv.visitEnd();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement