org.ow2.asmdex.util
Class RegisterShiftApplicationAdapter

java.lang.Object
  extended by org.ow2.asmdex.ApplicationVisitor
      extended by org.ow2.asmdex.util.RegisterShiftApplicationAdapter

public class RegisterShiftApplicationAdapter
extends ApplicationVisitor

Application Adapter used to shift all the registers found in the bytecode. This is done by overriding the visitClass method of this ApplicationAdapter, like shown below.

Author:
Julien Névo

Field Summary
protected  RegisterShiftClassAdapter shiftClassAdapter
          The adapter at level of classes.
 
Fields inherited from class org.ow2.asmdex.ApplicationVisitor
api, av
 
Constructor Summary
RegisterShiftApplicationAdapter(int api, ApplicationVisitor av, RegisterShiftClassAdapter shiftClassAdapter)
          Shift registers in application
 
Method Summary
 ClassVisitor visitClass(int access, java.lang.String name, java.lang.String[] signature, java.lang.String superName, java.lang.String[] interfaces)
          Visits a class of the application.
 
Methods inherited from class org.ow2.asmdex.ApplicationVisitor
visit, visitEnd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shiftClassAdapter

protected RegisterShiftClassAdapter shiftClassAdapter
The adapter at level of classes.

Constructor Detail

RegisterShiftApplicationAdapter

public RegisterShiftApplicationAdapter(int api,
                                       ApplicationVisitor av,
                                       RegisterShiftClassAdapter shiftClassAdapter)
Shift registers in application

Parameters:
api - api level
av - application visitor
shiftClassAdapter - adapter for shifting class
Method Detail

visitClass

public ClassVisitor visitClass(int access,
                               java.lang.String name,
                               java.lang.String[] signature,
                               java.lang.String superName,
                               java.lang.String[] interfaces)
Description copied from class: ApplicationVisitor
Visits a class of the application. This method must return a new ClassVisitor instance (or null) each time it is called, i.e., it should not return a previously returned visitor.

Overrides:
visitClass in class ApplicationVisitor
Parameters:
access - the access flags of the class (see Opcodes).
name - the internal name of the class.
signature - the signature of this class. May be null if the class is not a generic one, and does not extend or implement generic classes or interfaces.
superName - the internal of name of the super class. For interfaces, the super class is Object. May be null, but only for the Object class.
interfaces - the internal names of the class's interfaces. May be null.
Returns:
an object to visit the byte code of the application, or null if this application visitor is not interested in visiting the code of this class.