FileDocCategorySizeDatePackage
RawAttribute.javaAPI DocAndroid 5.1 API2747Thu Mar 12 22:18:30 GMT 2015com.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
{@code non-null;} attribute data
private final com.android.dx.rop.cst.ConstantPool
pool
{@code 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 {@code non-null;} attribute name
param
data {@code non-null;} attribute data
param
pool {@code 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 {@code non-null;} attribute name
param
data {@code non-null;} array containing the attribute data
param
offset offset in {@code data} to the attribute data
param
length length of the attribute data, in bytes
param
pool {@code 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
{@code 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
{@code null-ok;} the constant pool

        return pool;