org.ow2.asmdex
Class ApplicationVisitor

java.lang.Object
  extended by org.ow2.asmdex.ApplicationVisitor
Direct Known Subclasses:
ApplicationNode, ApplicationWriter, AsmDexifierApplicationVisitor, RegisterShiftApplicationAdapter

public abstract class ApplicationVisitor
extends java.lang.Object

A visitor to visit a Dex Application. The methods of this interface must be called in the following order: visit (visitClass)* visitEnd.

Author:
Julien Névo

Field Summary
protected  int api
          The ASM API version implemented by this visitor.
protected  ApplicationVisitor av
          The application visitor to which this visitor must delegate method calls.
 
Constructor Summary
ApplicationVisitor(int api)
          Constructs a new ApplicationVisitor.
ApplicationVisitor(int api, ApplicationVisitor av)
          Constructs a new ApplicationVisitor.
 
Method Summary
 void visit()
          Visits the header of the application.
 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.
 void visitEnd()
          Visits the end of the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

av

protected ApplicationVisitor av
The application visitor to which this visitor must delegate method calls. May be null.


api

protected final int api
The ASM API version implemented by this visitor.

Constructor Detail

ApplicationVisitor

public ApplicationVisitor(int api)
Constructs a new ApplicationVisitor.


ApplicationVisitor

public ApplicationVisitor(int api,
                          ApplicationVisitor av)
Constructs a new ApplicationVisitor.

Parameters:
av - the application visitor to which this visitor must delegate method calls. May be null.
Method Detail

visit

public void visit()
Visits the header of the application.


visitClass

public 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. 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.

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.

visitEnd

public void visitEnd()
Visits the end of the application. This method, which is the last one to be called, is used to inform the visitor that the whole Application has been visited.