com.alibaba.hotswap.processor.basic.BaseClassVisitor.java Source code

Java tutorial

Introduction

Here is the source code for com.alibaba.hotswap.processor.basic.BaseClassVisitor.java

Source

/*
 * Copyright 2012 Alibaba.com All right reserved. This software is the
 * confidential and proprietary information of Alibaba.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with Alibaba.com.
 */
package com.alibaba.hotswap.processor.basic;

import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Opcodes;

/**
 * @author yong.zhuy 2012-6-13
 */
public class BaseClassVisitor extends ClassVisitor {

    protected String className;

    protected boolean isInterface = false;

    public BaseClassVisitor(ClassVisitor cv) {
        super(Opcodes.ASM4, cv);
    }

    @Override
    public void visit(int version, int access, String name, String signature, String superName,
            String[] interfaces) {
        this.className = name;
        this.isInterface = ((access & Opcodes.ACC_INTERFACE) == Opcodes.ACC_INTERFACE);
        super.visit(version, access, name, signature, superName, interfaces);
    }
}