com.android.dx.cf.attrib
Class AttCode

java.lang.Object
  extended by com.android.dx.cf.attrib.BaseAttribute
      extended by com.android.dx.cf.attrib.AttCode
All Implemented Interfaces:
Attribute

public final class AttCode
extends BaseAttribute

Attribute class for standard Code attributes.


Field Summary
static String ATTRIBUTE_NAME
          non-null; attribute name for attributes of this type
 
Constructor Summary
AttCode(int maxStack, int maxLocals, BytecodeArray code, ByteCatchList catches, AttributeList attributes)
          Constructs an instance.
 
Method Summary
 int byteLength()
          Get the total length of the attribute in bytes, including the header.
 AttributeList getAttributes()
          Gets the associated attribute list.
 ByteCatchList getCatches()
          Gets the exception table.
 BytecodeArray getCode()
          Gets the bytecode array.
 int getMaxLocals()
          Gets the number of locals.
 int getMaxStack()
          Gets the maximum stack size.
 
Methods inherited from class com.android.dx.cf.attrib.BaseAttribute
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_NAME

public static final String ATTRIBUTE_NAME
non-null; attribute name for attributes of this type

See Also:
Constant Field Values
Constructor Detail

AttCode

public AttCode(int maxStack,
               int maxLocals,
               BytecodeArray code,
               ByteCatchList catches,
               AttributeList attributes)
Constructs an instance.

Parameters:
maxStack - >= 0; the stack size
maxLocals - >= 0; the number of locals
code - non-null; array containing the bytecode per se
catches - non-null; the exception table
attributes - non-null; the associated list of attributes
Method Detail

byteLength

public int byteLength()
Description copied from interface: Attribute
Get the total length of the attribute in bytes, including the header. Since the header is always six bytes, the result of this method is always at least 6.

Returns:
>= 6; the total length, in bytes

getMaxStack

public int getMaxStack()
Gets the maximum stack size.

Returns:
>= 0; the maximum stack size

getMaxLocals

public int getMaxLocals()
Gets the number of locals.

Returns:
>= 0; the number of locals

getCode

public BytecodeArray getCode()
Gets the bytecode array.

Returns:
non-null; the bytecode array

getCatches

public ByteCatchList getCatches()
Gets the exception table.

Returns:
non-null; the exception table

getAttributes

public AttributeList getAttributes()
Gets the associated attribute list.

Returns:
non-null; the attribute list


Copyright © 2015. All rights reserved.