接口 org.objectweb.asm.ClassVisitor
的使用

使用 ClassVisitor 的软件包
org.eclipse.jetty.annotations   
org.objectweb.asm Provides a small and fast bytecode manipulation framework. 
org.objectweb.asm.commons Provides some useful class and method adapters. 
org.objectweb.asm.optimizer   
org.objectweb.asm.tree Provides an ASM visitor that constructs a tree representation of the classes it visits. 
org.objectweb.asm.util Provides ASM visitors that can be useful for programming and debugging purposes. 
org.objectweb.asm.xml Provides SAX 2.0 adapters for ASM visitors to convert classes to and from XML. 
 

org.eclipse.jetty.annotations 中 ClassVisitor 的使用
 

实现 ClassVisitor 的 org.eclipse.jetty.annotations 中的类
 class AnnotationParser.MyClassVisitor
          MyClassVisitor ASM visitor for a class.
 

org.objectweb.asm 中 ClassVisitor 的使用
 

实现 ClassVisitor 的 org.objectweb.asm 中的类
 class ClassAdapter
          An empty ClassVisitor that delegates to another ClassVisitor.
 class ClassWriter
          A ClassVisitor that generates classes in bytecode form.
 

声明为 ClassVisitor 的 org.objectweb.asm 中的字段
protected  ClassVisitor ClassAdapter.cv
          The ClassVisitor to which this adapter delegates calls.
 

参数类型为 ClassVisitor 的 org.objectweb.asm 中的方法
 void ClassReader.accept(ClassVisitor classVisitor, Attribute[] attrs, int flags)
          Makes the given visitor visit the Java class of this ClassReader.
 void ClassReader.accept(ClassVisitor classVisitor, int flags)
          Makes the given visitor visit the Java class of this ClassReader.
 

参数类型为 ClassVisitor 的 org.objectweb.asm 中的构造方法
ClassAdapter(ClassVisitor cv)
          Constructs a new ClassAdapter object.
 

org.objectweb.asm.commons 中 ClassVisitor 的使用
 

实现 ClassVisitor 的 org.objectweb.asm.commons 中的类
 class EmptyVisitor
          An empty implementation of the ASM visitor interfaces.
 class RemappingClassAdapter
          A ClassAdapter for type remapping.
 class SerialVersionUIDAdder
          A ClassAdapter that adds a serial version unique identifier to a class if missing.
 class StaticInitMerger
          A ClassAdapter that merges clinit methods into a single one.
 

参数类型为 ClassVisitor 的 org.objectweb.asm.commons 中的构造方法
GeneratorAdapter(int access, Method method, String signature, Type[] exceptions, ClassVisitor cv)
          Creates a new GeneratorAdapter.
RemappingClassAdapter(ClassVisitor cv, Remapper remapper)
           
SerialVersionUIDAdder(ClassVisitor cv)
          Creates a new SerialVersionUIDAdder.
StaticInitMerger(String prefix, ClassVisitor cv)
           
 

org.objectweb.asm.optimizer 中 ClassVisitor 的使用
 

实现 ClassVisitor 的 org.objectweb.asm.optimizer 中的类
 class ClassConstantsCollector
          A ClassVisitor that collects the Constants of the classes it visits.
 class ClassOptimizer
          A ClassAdapter that renames fields and methods, and removes debug info.
 

参数类型为 ClassVisitor 的 org.objectweb.asm.optimizer 中的构造方法
ClassConstantsCollector(ClassVisitor cv, ConstantPool cp)
           
ClassOptimizer(ClassVisitor cv, Remapper remapper)
           
 

org.objectweb.asm.tree 中 ClassVisitor 的使用
 

实现 ClassVisitor 的 org.objectweb.asm.tree 中的类
 class ClassNode
          A node that represents a class.
 

参数类型为 ClassVisitor 的 org.objectweb.asm.tree 中的方法
 void MethodNode.accept(ClassVisitor cv)
          Makes the given class visitor visit this method.
 void InnerClassNode.accept(ClassVisitor cv)
          Makes the given class visitor visit this inner class.
 void FieldNode.accept(ClassVisitor cv)
          Makes the given class visitor visit this field.
 void ClassNode.accept(ClassVisitor cv)
          Makes the given class visitor visit this class.
 

org.objectweb.asm.util 中 ClassVisitor 的使用
 

实现 ClassVisitor 的 org.objectweb.asm.util 中的类
 class ASMifierClassVisitor
          A ClassVisitor that prints the ASM code that generates the classes it visits.
 class CheckClassAdapter
          A ClassAdapter that checks that its methods are properly used.
 class TraceClassVisitor
          A ClassVisitor that prints a disassembled view of the classes it visits.
 

声明为 ClassVisitor 的 org.objectweb.asm.util 中的字段
protected  ClassVisitor TraceClassVisitor.cv
          The ClassVisitor to which this visitor delegates calls.
 

参数类型为 ClassVisitor 的 org.objectweb.asm.util 中的构造方法
CheckClassAdapter(ClassVisitor cv)
          Constructs a new CheckClassAdapter.
TraceClassVisitor(ClassVisitor cv, PrintWriter pw)
          Constructs a new TraceClassVisitor.
 

org.objectweb.asm.xml 中 ClassVisitor 的使用
 

实现 ClassVisitor 的 org.objectweb.asm.xml 中的类
 class SAXClassAdapter
          A ClassVisitor that generates SAX 2.0 events from the visited class.
 



Copyright © 2013. All Rights Reserved.