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

BaseAnnotations

public abstract class BaseAnnotations extends BaseAttribute
Base class for annotations attributes.

Fields Summary
private final com.android.dx.rop.annotation.Annotations
annotations
non-null; list of annotations
private final int
byteLength
>= 0; attribute data length in the original classfile (not including the attribute header)
Constructors Summary
public BaseAnnotations(String attributeName, com.android.dx.rop.annotation.Annotations annotations, int byteLength)
Constructs an instance.

param
attributeName non-null; the name of the attribute
param
annotations non-null; the list of annotations
param
byteLength >= 0; attribute data length in the original classfile (not including the attribute header)

        super(attributeName);

        try {
            if (annotations.isMutable()) {
                throw new MutabilityException("annotations.isMutable()");
            }
        } catch (NullPointerException ex) {
            // Translate the exception.
            throw new NullPointerException("annotations == null");
        }

        this.annotations = annotations;
        this.byteLength = byteLength;
    
Methods Summary
public final intbyteLength()
{@inheritDoc}

        // Add six for the standard attribute header.
        return byteLength + 6;
    
public final com.android.dx.rop.annotation.AnnotationsgetAnnotations()
Gets the list of annotations associated with this instance.

return
non-null; the list

        return annotations;