Package org.more.asm

Examples of org.more.asm.ClassReader


        //------第三环,Aop
        visitor = new AopClassAdapter(visitor, this);
        //3.Read
        String resName = superClass.getName().replace(".", "/") + ".class";
        InputStream inStream = superClass.getClassLoader().getResourceAsStream(resName);
        ClassReader reader = new ClassReader(inStream);//创建ClassReader
        reader.accept(visitor, ClassReader.SKIP_DEBUG);
        return writer.toByteArray();
    }
View Full Code Here


        //------第三环,ClassAdapter
        visitor = new PropertyDelegateClassAdapter(visitor, this);
        //3.Read
        String resName = superClass.getName().replace(".", "/") + ".class";
        InputStream inStream = superClass.getClassLoader().getResourceAsStream(resName);
        ClassReader reader = new ClassReader(inStream);//创建ClassReader
        reader.accept(visitor, ClassReader.SKIP_DEBUG);
        return writer.toByteArray();
    }
View Full Code Here

        //------第三环,ClassAdapter
        visitor = new MethodDelegateClassAdapter(visitor, this);
        //3.Read
        String resName = superClass.getName().replace(".", "/") + ".class";
        InputStream inStream = superClass.getClassLoader().getResourceAsStream(resName);
        ClassReader reader = new ClassReader(inStream);//创建ClassReader
        reader.accept(visitor, ClassReader.SKIP_DEBUG);
        return writer.toByteArray();
    }
View Full Code Here

        /*一、检查类是否已经被加载过,避免重复扫描同一个类*/
        if (this.classInfoMap.containsKey(className) == true) {
            return this.classInfoMap.get(className);
        }
        /*二、使用 ClassReader 读取类的基本信息*/
        ClassReader classReader = new ClassReader(inStream);
        className = classReader.getClassName().replace('/', '.');
        /*三、读取类的(名称、父类、接口、注解)信息*/
        final ClassInfo info = new ClassInfo();
        classReader.accept(new ClassVisitor(Opcodes.ASM4) {
            @Override
            public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) {
                //1.读取基本信息
                info.className = name.replace('/', '.');
                if (superName != null) {
View Full Code Here

TOP

Related Classes of org.more.asm.ClassReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.