Package com.android.dx.cf.attrib
Class AttCode
java.lang.Object
com.android.dx.cf.attrib.BaseAttribute
com.android.dx.cf.attrib.AttCode
- All Implemented Interfaces:
Attribute
Attribute class for standard
Code
attributes.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
non-null;
attribute name for attributes of this type -
Constructor Summary
ConstructorDescriptionAttCode
(int maxStack, int maxLocals, BytecodeArray code, ByteCatchList catches, AttributeList attributes) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the total length of the attribute in bytes, including the header.Gets the associated attribute list.Gets the exception table.getCode()
Gets the bytecode array.int
Gets the number of locals.int
Gets the maximum stack size.Methods inherited from class com.android.dx.cf.attrib.BaseAttribute
getName
-
Field Details
-
ATTRIBUTE_NAME
non-null;
attribute name for attributes of this type- See Also:
-
-
Constructor Details
-
AttCode
public AttCode(int maxStack, int maxLocals, BytecodeArray code, ByteCatchList catches, AttributeList attributes) Constructs an instance.- Parameters:
maxStack
->= 0;
the stack sizemaxLocals
->= 0;
the number of localscode
-non-null;
array containing the bytecode per secatches
-non-null;
the exception tableattributes
-non-null;
the associated list of attributes
-
-
Method Details
-
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 least6
.- 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
Gets the bytecode array.- Returns:
non-null;
the bytecode array
-
getCatches
Gets the exception table.- Returns:
non-null;
the exception table
-
getAttributes
Gets the associated attribute list.- Returns:
non-null;
the attribute list
-