Generated by
JDiff

org.objectweb.asm Documentation Differences

This file contains all the changes in documentation in the package org.objectweb.asm as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class ClassReader, void accept(ClassVisitor, Attribute[], int)

Makes the given visitor visit the Java class of this ClassReader. This class is the one specified in the constructor (see ClassReader). @param classVisitor the visitor that must visit this class. @param attrs prototypes of the attributes that must be parsed during the visit of the class. Any attribute whose type is not equal to the type of one the prototypes will not be parsed: its byte array value will be passed unchanged to the ClassWriter. This may corrupt it if this value contains references to the constant pool, or has syntactic or semantic links with a class element that has been transformed by a class adapter between the reader and the writer. @param flags option flags that can be used to modify the default behavior of this class. See .SKIP_DEBUG, .EXPAND_FRAMES, .SKIP_FRAMES, .SKIP_CODE.
Class ClassReader, void accept(ClassVisitor, int)

Makes the given visitor visit the Java class of this ClassReader. This class is the one specified in the constructor (see ClassReader). @param classVisitor the visitor that must visit this class. @param flags option flags that can be used to modify the default behavior of this class. See .SKIP_DEBUG, .EXPAND_FRAMES, .SKIP_FRAMES, .SKIP_CODE.

Class ClassWriter

A ClassVisitor that generates classes in bytecode form. More precisely this visitor generates a byte array conforming to the Java class file format. It can be used alone, to generate a Java class "from scratch", or with one or more ClassReader and adapter class visitor to generate a modified class from one or more existing Java classes. @author Eric Bruneton
Class ClassWriter, constructor ClassWriter(ClassReader, int)

Constructs a new ClassWriter object and enables optimizations for "mostly add" bytecode transformations. These optimizations are the following: @param classReader the ClassReader used to read the original class. It will be used to copy the entire constant pool from the original class and also to copy other fragments of original bytecode where applicable. @param flags option flags that can be used to modify the default behavior of this class. See .COMPUTE_MAXS, .COMPUTE_FRAMES.
Class ClassWriter, constructor ClassWriter(int)

Constructs a new ClassWriter object. @param flags option flags that can be used to modify the default behavior of this class. See .COMPUTE_MAXS, .COMPUTE_FRAMES.
Class ClassWriter, String getCommonSuperClass(String, String)

Returns the common super type of the two given types. The default implementation of this method loads the two given classes and uses the java.lang.Class methods to find the common super class. It can be overridenoverridden to compute this common super type in other ways, in particular without actually loading any class, or to take into account the class that is currently being generated by this ClassWriter, which can of course not be loaded since it is under construction. @param type1 the internal name of a class. @param type2 the internal name of another class. @return the internal name of the common super class of the two given classes.
Class ClassWriter, int newClass(String)

Adds a class reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters. @param value the internal name of the class. @return the index of a new or already existing class reference item.
Class ClassWriter, int newConst(Object)

Adds a number or string constant to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters. @param cst the value of the constant to be added to the constant pool. This parameter must be an Integer, a Float, a Long, a Double or a String. @return the index of a new or already existing constant item with the given value.
Class ClassWriter, int newField(String, String, String)

Adds a field reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters. @param owner the internal name of the field's owner class. @param name the field's name. @param desc the field's descriptor. @return the index of a new or already existing field reference item.
Class ClassWriter, int newMethod(String, String, String, boolean)

Adds a method reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters. @param owner the internal name of the method's owner class. @param name the method's name. @param desc the method's descriptor. @param itf true if owner is an interface. @return the index of a new or already existing method reference item.
Class ClassWriter, int newNameType(String, String)

Adds a name and type to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters. @param name a name. @param desc a type descriptor. @return the index of a new or already existing name and type item.
Class ClassWriter, int newUTF8(String)

Adds an UTF8 string to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters. @param value the String value. @return the index of a new or already existing UTF8 item.
Class ClassWriter, byte[] toByteArray()

Returns the bytecode of the class that was build with this class writer. @return the bytecode of the class that was build with this class writer.
Class ClassWriter, int COMPUTE_FRAMES

Flag to automatically compute the stack map frames of methods from scratch. If this flag is set, then the calls to the MethodVisitor.visitFrame method are ignored, and the stack map frames are recomputed from the methods bytecode. The arguments of the visitMaxs method are also ignored and recomputed from the bytecode. In other words, computeFrames implies computeMaxs. @see #ClassWriter(int)
Class ClassWriter, int COMPUTE_MAXS

Flag to automatically compute the maximum stack size and the maximum number of local variables of methods. If this flag is set, then the arguments of the visitMaxs method of the MethodVisitor returned by the visitMethod method will be ignored, and computed automatically from the signature and the bytecode of each method. @see #ClassWriter(int)

Class Label, Object info

Field used to associate user information to a label. Warning: this field is used by the ASM tree package. In order to use it with the ASM tree package you must override the org.objectweb.asm.tree.MethodNode.getLabelNode method.

Class MethodVisitor, void visitFrame(int, int, Object[], int, Object[])

Visits the current state of the local variables and operand stack elements. This method must(*) be called just before any instruction i that follows an unconditionnal branch instruction such as GOTO or THROW, that is the target of a jump instruction, or that starts an exception handler block. The visited types must describe the values of the local variables and of the operand stack elements just before i is executed.

(*) this is mandatory only for classes whose version is greater than or equal to V1_6.

Packed frames are basically "deltas" from the state of the previous frame (very first frame is implicitly defined by the method's parameters and access flags):
  • Opcodes.F_SAME representing frame with exactly the same locals as the previous frame and with the empty stack.
  • Opcodes.F_SAME1 representing frame with exactly the same locals as the previous frame and with single value on the stack (nStack is 1 and stack[0] contains value for the type of the stack item).
  • Opcodes.F_APPEND representing frame with current locals are the same as the locals in the previous frame, except that additional locals are defined (nLocal is 1, 2 or 3 and local elements contains values representing added types).
  • Opcodes.F_CHOP representing frame with current locals are the same as the locals in the previous frame, except that the last 1-3 locals are absent and with the empty stack (nLocals is 1, 2 or 3).
  • Opcodes.F_FULL representing complete frame data.
@param type the type of this stack map frame. Must be Opcodes.F_NEW for expanded frames, or Opcodes.F_FULL, Opcodes.F_APPEND, Opcodes.F_CHOP, Opcodes.F_SAME or Opcodes.F_APPEND, Opcodes.F_SAME1 for compressed frames. @param nLocal the number of local variables in the visited frame. @param local the local variable types in this frame. This array must not be modified. Primitive types are represented by Opcodes.TOP, Opcodes.INTEGER, Opcodes.FLOAT, Opcodes.LONG, Opcodes.DOUBLE,Opcodes.NULL or Opcodes.UNINITIALIZED_THIS (long and double are represented by a single element). Reference types are represented by String objects (representing internal names, or type descriptors for array types), and uninitialized types by Label types by Label objects (this label designates the NEW instruction that created that created this uninitialized value). @param nStack the number of operand stack elements in the visited frame. @param stack the operand stack types in this frame. This array must not be modified. Its content has the same format as the "local" array.
Class MethodVisitor, void visitTypeInsn(int, String)

Visits a type instruction. A type instruction is an instruction that takes athe typeinternal name descriptorof a class as parameter. @param opcode the opcode of the type instruction to be visited. This opcode is either NEW, ANEWARRAY, CHECKCAST or INSTANCEOF. @param desctype the operand of the instruction to be visited. This operand is operand must be a fully qualifiedthe classinternal name inof internalan form,object or the type descriptor of an array typeclass (see TypegetInternalName).

Class Type, String getInternalName()

Returns the internal name of the class corresponding to this object or array type. The internal name of a class is its fully qualified name (as returned by Class.getName(), where '.' are are replaced by '/'. This methodmethod should only be used for an object or array type. @return the internal name of the class corresponding to this object type.
Class Type, String getInternalName(Class)

Returns the internal name of the given class. The internal name of a class is its fully qualified name, whereas returned by Class.getName(), where '.' are replaced by '/'. @param c an object or array class. @return the internal name of the given class.
Class Type, Type getObjectType(String)

Returns the Type.OBJECTJava type forcorresponding to the given internal class name. This is a shortcut method for Type.getType("L"+name+";"). Note that opposed to Type.getType(String), this method takes internal class names and not class descriptor. @param nameinternalName an internal class name. @return the the Type.OBJECTJava type forcorresponding to the given classinternal name.