FileDocCategorySizeDatePackage
RawAttribute.javaAPI DocAndroid 1.5 API2677Wed May 06 22:41:02 BST 2009com.android.dx.cf.attrib

RawAttribute

public final class RawAttribute extends BaseAttribute
Raw attribute, for holding onto attributes that are unrecognized.

Fields Summary
private final com.android.dx.util.ByteArray
data
non-null; attribute data
private final com.android.dx.rop.cst.ConstantPool
pool
null-ok; constant pool to use for resolution of cpis in {@link #data}
Constructors Summary
public RawAttribute(String name, com.android.dx.util.ByteArray data, com.android.dx.rop.cst.ConstantPool pool)
Constructs an instance.

param
name non-null; attribute name
param
data non-null; attribute data
param
pool null-ok; constant pool to use for cpi resolution

        super(name);

        if (data == null) {
            throw new NullPointerException("data == null");
        }

        this.data = data;
        this.pool = pool;
    
public RawAttribute(String name, com.android.dx.util.ByteArray data, int offset, int length, com.android.dx.rop.cst.ConstantPool pool)
Constructs an instance from a sub-array of a {@link ByteArray}.

param
name non-null; attribute name
param
data non-null; array containing the attribute data
param
offset offset in data to the attribute data
param
length length of the attribute data, in bytes
param
pool null-ok; constant pool to use for cpi resolution

        this(name, data.slice(offset, offset + length), pool);
    
Methods Summary
public intbyteLength()
{@inheritDoc}

        return data.size() + 6;
    
public com.android.dx.util.ByteArraygetData()
Get the raw data of the attribute.

return
non-null; the data

        return data;
    
public com.android.dx.rop.cst.ConstantPoolgetPool()
Gets the constant pool to use for cpi resolution, if any. It presumably came from the class file that this attribute came from.

return
null-ok; the constant pool

        return pool;