ProGuard

proguard.classfile
Class CodeAttrInfo

java.lang.Object
  extended byproguard.classfile.AttrInfo
      extended byproguard.classfile.CodeAttrInfo
All Implemented Interfaces:
VisitorAccepter

public class CodeAttrInfo
extends AttrInfo

Representation of a code attribute.


Field Summary
 AttrInfo[] attributes
           
 byte[] code
           
 ExceptionInfo[] exceptionTable
           
 int u2attributesCount
           
 int u2exceptionTableLength
           
 int u2maxLocals
           
 int u2maxStack
           
 int u4codeLength
           
 
Fields inherited from class proguard.classfile.AttrInfo
u2attrNameIndex, visitorInfo
 
Constructor Summary
protected CodeAttrInfo()
           
 
Method Summary
 void accept(ClassFile classFile, AttrInfoVisitor attrInfoVisitor)
          Accepts the given visitor.
 void accept(ClassFile classFile, MethodInfo methodInfo, AttrInfoVisitor attrInfoVisitor)
          Accepts the given visitor in the context of a method.
 void attributesAccept(ClassFile classFile, MethodInfo methodInfo, AttrInfoVisitor attrInfoVisitor)
          Applies the given attribute visitor to all attributes.
 void exceptionsAccept(ClassFile classFile, MethodInfo methodInfo, ExceptionInfoVisitor exceptionInfoVisitor)
          Applies the given exception visitor to all exceptions.
 AttrInfo getAttribute(ClassFile classFile, String name)
          Returns the (first) attribute with the given name.
protected  int getAttrInfoLength()
          Returns the length in bytes of the attribute.
 void instructionAccept(ClassFile classFile, MethodInfo methodInfo, InstructionVisitor instructionVisitor, int offset)
          Applies the given instruction visitor to the given instruction.
 void instructionsAccept(ClassFile classFile, MethodInfo methodInfo, InstructionVisitor instructionVisitor)
          Applies the given instruction visitor to all instructions.
protected  void readInfo(DataInput din, ClassFile cf)
          Reads the data following the header.
protected  void writeInfo(DataOutput dout)
          Exports data following the header to a DataOutput stream.
 
Methods inherited from class proguard.classfile.AttrInfo
accept, accept, create, getAttributeName, getVisitorInfo, setVisitorInfo, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

u2maxStack

public int u2maxStack

u2maxLocals

public int u2maxLocals

u4codeLength

public int u4codeLength

code

public byte[] code

u2exceptionTableLength

public int u2exceptionTableLength

exceptionTable

public ExceptionInfo[] exceptionTable

u2attributesCount

public int u2attributesCount

attributes

public AttrInfo[] attributes
Constructor Detail

CodeAttrInfo

protected CodeAttrInfo()
Method Detail

getAttribute

public AttrInfo getAttribute(ClassFile classFile,
                             String name)
Returns the (first) attribute with the given name.


getAttrInfoLength

protected int getAttrInfoLength()
Description copied from class: AttrInfo
Returns the length in bytes of the attribute.

Specified by:
getAttrInfoLength in class AttrInfo

readInfo

protected void readInfo(DataInput din,
                        ClassFile cf)
                 throws IOException
Description copied from class: AttrInfo
Reads the data following the header.

Specified by:
readInfo in class AttrInfo
Throws:
IOException

writeInfo

protected void writeInfo(DataOutput dout)
                  throws IOException
Description copied from class: AttrInfo
Exports data following the header to a DataOutput stream.

Specified by:
writeInfo in class AttrInfo
Throws:
IOException

accept

public void accept(ClassFile classFile,
                   AttrInfoVisitor attrInfoVisitor)
Description copied from class: AttrInfo
Accepts the given visitor. This default implementation does nothing, which is useful for attributes that require a context.

Overrides:
accept in class AttrInfo

accept

public void accept(ClassFile classFile,
                   MethodInfo methodInfo,
                   AttrInfoVisitor attrInfoVisitor)
Description copied from class: AttrInfo
Accepts the given visitor in the context of a method. This default implementation ignores the context.

Overrides:
accept in class AttrInfo

instructionsAccept

public void instructionsAccept(ClassFile classFile,
                               MethodInfo methodInfo,
                               InstructionVisitor instructionVisitor)
Applies the given instruction visitor to all instructions.


instructionAccept

public void instructionAccept(ClassFile classFile,
                              MethodInfo methodInfo,
                              InstructionVisitor instructionVisitor,
                              int offset)
Applies the given instruction visitor to the given instruction.


exceptionsAccept

public void exceptionsAccept(ClassFile classFile,
                             MethodInfo methodInfo,
                             ExceptionInfoVisitor exceptionInfoVisitor)
Applies the given exception visitor to all exceptions.


attributesAccept

public void attributesAccept(ClassFile classFile,
                             MethodInfo methodInfo,
                             AttrInfoVisitor attrInfoVisitor)
Applies the given attribute visitor to all attributes.


ProGuard