org.ow2.asmdex.tree
Class ApplicationNode

java.lang.Object
  extended by org.ow2.asmdex.ApplicationVisitor
      extended by org.ow2.asmdex.tree.ApplicationNode

public class ApplicationNode
extends ApplicationVisitor

A node that represents an Application.

Author:
Julien Névo, based on the ASM framework.

Field Summary
 java.util.List<ClassNode> classes
          The Classes of this Application.
 java.util.List<AnnotationNode> invisibleAnnotations
          The runtime invisible annotations of this class, field or method.
 java.util.List<AnnotationNode> visibleAnnotations
          The runtime visible annotations of this class, field or method.
 
Fields inherited from class org.ow2.asmdex.ApplicationVisitor
api, av
 
Constructor Summary
ApplicationNode(int api)
          Constructs a new ApplicationNode.
 
Method Summary
 void accept(ApplicationVisitor av)
          Makes the given Application visitor visit this Application.
static java.lang.String[] getStringArray(java.util.List<java.lang.String> list)
          Returns an array of String from a list of Strings, or Null if the list if Null.
 void visit()
          Visits the header of the application.
 AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
          Visits an annotation of this class, field or method.
 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
visitEnd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classes

public java.util.List<ClassNode> classes
The Classes of this Application.


visibleAnnotations

public java.util.List<AnnotationNode> visibleAnnotations
The runtime visible annotations of this class, field or method.


invisibleAnnotations

public java.util.List<AnnotationNode> invisibleAnnotations
The runtime invisible annotations of this class, field or method.

Constructor Detail

ApplicationNode

public ApplicationNode(int api)
Constructs a new ApplicationNode.

Parameters:
api - the API level
Method Detail

visit

public void visit()
Description copied from class: ApplicationVisitor
Visits the header of the application.

Overrides:
visit in class ApplicationVisitor

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.

accept

public void accept(ApplicationVisitor av)
Makes the given Application visitor visit this Application.

Parameters:
av - an Application visitor.

getStringArray

public static java.lang.String[] getStringArray(java.util.List<java.lang.String> list)
Returns an array of String from a list of Strings, or Null if the list if Null.

Parameters:
list - the list to convert.
Returns:
an array of String from a list of Strings, or Null if the list if Null.

visitAnnotation

public AnnotationVisitor visitAnnotation(java.lang.String desc,
                                         boolean visible)
Visits an annotation of this class, field or method.

Parameters:
desc - the class descriptor of the annotation class.
visible - true if the annotation is visible at runtime.
Returns:
a visitor to visit the annotation values.