org.objectweb.speedo.generation.enhancer
Class CodeDuplicator

java.lang.Object
  extended byorg.objectweb.speedo.generation.enhancer.LoggedClass
      extended byorg.objectweb.speedo.generation.enhancer.CodeDuplicator
All Implemented Interfaces:
org.objectweb.asm.CodeVisitor

public class CodeDuplicator
extends LoggedClass
implements org.objectweb.asm.CodeVisitor

Creates several copies of a method.


Field Summary
 
Fields inherited from class org.objectweb.speedo.generation.enhancer.LoggedClass
debug, logger
 
Constructor Summary
CodeDuplicator(org.objectweb.asm.CodeVisitor[] cvs)
          Constructs a CodeDuplicator.
CodeDuplicator(java.util.List cvs)
          Constructs a CodeDuplicator.
CodeDuplicator(org.objectweb.util.monolog.api.Logger logger)
           
 
Method Summary
 void visitAttribute(org.objectweb.asm.Attribute attribute)
           
 void visitFieldInsn(int opcode, java.lang.String owner, java.lang.String name, java.lang.String desc)
           
 void visitIincInsn(int var, int increment)
           
 void visitInsn(int opcode)
           
 void visitIntInsn(int opcode, int operand)
           
 void visitJumpInsn(int opcode, org.objectweb.asm.Label label)
           
 void visitLabel(org.objectweb.asm.Label label)
           
 void visitLdcInsn(java.lang.Object cst)
           
 void visitLineNumber(int line, org.objectweb.asm.Label start)
           
 void visitLocalVariable(java.lang.String name, java.lang.String desc, org.objectweb.asm.Label start, org.objectweb.asm.Label end, int index)
           
 void visitLookupSwitchInsn(org.objectweb.asm.Label dflt, int[] keys, org.objectweb.asm.Label[] labels)
           
 void visitMaxs(int maxStack, int maxLocals)
           
 void visitMethodInsn(int opcode, java.lang.String owner, java.lang.String name, java.lang.String desc)
           
 void visitMultiANewArrayInsn(java.lang.String desc, int dims)
           
 void visitTableSwitchInsn(int min, int max, org.objectweb.asm.Label dflt, org.objectweb.asm.Label[] labels)
           
 void visitTryCatchBlock(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, java.lang.String type)
           
 void visitTypeInsn(int opcode, java.lang.String desc)
           
 void visitVarInsn(int opcode, int var)
           
 
Methods inherited from class org.objectweb.speedo.generation.enhancer.LoggedClass
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeDuplicator

public CodeDuplicator(org.objectweb.util.monolog.api.Logger logger)

CodeDuplicator

public CodeDuplicator(java.util.List cvs)
Constructs a CodeDuplicator.

Parameters:
cvs - a list of code visitors, to be used to generate the copies.

CodeDuplicator

public CodeDuplicator(org.objectweb.asm.CodeVisitor[] cvs)
Constructs a CodeDuplicator.

Parameters:
cvs - an array of code visitors, to be used to generate the copies.
Method Detail

visitInsn

public void visitInsn(int opcode)
Specified by:
visitInsn in interface org.objectweb.asm.CodeVisitor

visitIntInsn

public void visitIntInsn(int opcode,
                         int operand)
Specified by:
visitIntInsn in interface org.objectweb.asm.CodeVisitor

visitVarInsn

public void visitVarInsn(int opcode,
                         int var)
Specified by:
visitVarInsn in interface org.objectweb.asm.CodeVisitor

visitTypeInsn

public void visitTypeInsn(int opcode,
                          java.lang.String desc)
Specified by:
visitTypeInsn in interface org.objectweb.asm.CodeVisitor

visitFieldInsn

public void visitFieldInsn(int opcode,
                           java.lang.String owner,
                           java.lang.String name,
                           java.lang.String desc)
Specified by:
visitFieldInsn in interface org.objectweb.asm.CodeVisitor

visitMethodInsn

public void visitMethodInsn(int opcode,
                            java.lang.String owner,
                            java.lang.String name,
                            java.lang.String desc)
Specified by:
visitMethodInsn in interface org.objectweb.asm.CodeVisitor

visitJumpInsn

public void visitJumpInsn(int opcode,
                          org.objectweb.asm.Label label)
Specified by:
visitJumpInsn in interface org.objectweb.asm.CodeVisitor

visitLabel

public void visitLabel(org.objectweb.asm.Label label)
Specified by:
visitLabel in interface org.objectweb.asm.CodeVisitor

visitLdcInsn

public void visitLdcInsn(java.lang.Object cst)
Specified by:
visitLdcInsn in interface org.objectweb.asm.CodeVisitor

visitIincInsn

public void visitIincInsn(int var,
                          int increment)
Specified by:
visitIincInsn in interface org.objectweb.asm.CodeVisitor

visitTableSwitchInsn

public void visitTableSwitchInsn(int min,
                                 int max,
                                 org.objectweb.asm.Label dflt,
                                 org.objectweb.asm.Label[] labels)
Specified by:
visitTableSwitchInsn in interface org.objectweb.asm.CodeVisitor

visitLookupSwitchInsn

public void visitLookupSwitchInsn(org.objectweb.asm.Label dflt,
                                  int[] keys,
                                  org.objectweb.asm.Label[] labels)
Specified by:
visitLookupSwitchInsn in interface org.objectweb.asm.CodeVisitor

visitMultiANewArrayInsn

public void visitMultiANewArrayInsn(java.lang.String desc,
                                    int dims)
Specified by:
visitMultiANewArrayInsn in interface org.objectweb.asm.CodeVisitor

visitTryCatchBlock

public void visitTryCatchBlock(org.objectweb.asm.Label start,
                               org.objectweb.asm.Label end,
                               org.objectweb.asm.Label handler,
                               java.lang.String type)
Specified by:
visitTryCatchBlock in interface org.objectweb.asm.CodeVisitor

visitMaxs

public void visitMaxs(int maxStack,
                      int maxLocals)
Specified by:
visitMaxs in interface org.objectweb.asm.CodeVisitor

visitLocalVariable

public void visitLocalVariable(java.lang.String name,
                               java.lang.String desc,
                               org.objectweb.asm.Label start,
                               org.objectweb.asm.Label end,
                               int index)
Specified by:
visitLocalVariable in interface org.objectweb.asm.CodeVisitor

visitLineNumber

public void visitLineNumber(int line,
                            org.objectweb.asm.Label start)
Specified by:
visitLineNumber in interface org.objectweb.asm.CodeVisitor

visitAttribute

public void visitAttribute(org.objectweb.asm.Attribute attribute)
Specified by:
visitAttribute in interface org.objectweb.asm.CodeVisitor