Package com.android.dx.cf.attrib
Class RawAttribute
java.lang.Object
com.android.dx.cf.attrib.BaseAttribute
com.android.dx.cf.attrib.RawAttribute
- All Implemented Interfaces:
Attribute
Raw attribute, for holding onto attributes that are unrecognized.
-
Constructor Summary
ConstructorDescriptionRawAttribute
(String name, ByteArray data, int offset, int length, ConstantPool pool) Constructs an instance from a sub-array of aByteArray
.RawAttribute
(String name, ByteArray data, ConstantPool pool) Constructs an instance. -
Method Summary
Methods inherited from class com.android.dx.cf.attrib.BaseAttribute
getName
-
Constructor Details
-
RawAttribute
Constructs an instance.- Parameters:
name
-non-null;
attribute namedata
-non-null;
attribute datapool
-null-ok;
constant pool to use for cpi resolution
-
RawAttribute
Constructs an instance from a sub-array of aByteArray
.- Parameters:
name
-non-null;
attribute namedata
-non-null;
array containing the attribute dataoffset
- offset indata
to the attribute datalength
- length of the attribute data, in bytespool
-null-ok;
constant pool to use for cpi resolution
-
-
Method Details
-
getData
Get the raw data of the attribute.- Returns:
non-null;
the data
-
byteLength
public int byteLength()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
-
getPool
Gets the constant pool to use for cpi resolution, if any. It presumably came from the class file that this attribute came from.- Returns:
null-ok;
the constant pool
-