Java Code Examples for com.android.dx.rop.annotation.Annotations#isMutable()

The following examples show how to use com.android.dx.rop.annotation.Annotations#isMutable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseAnnotations.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param attributeName {@code non-null;} the name of the attribute
 * @param annotations {@code non-null;} the list of annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseAnnotations(String attributeName, Annotations annotations,
        int byteLength) {
    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;
}
 
Example 2
Source File: BaseAnnotations.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param attributeName {@code non-null;} the name of the attribute
 * @param annotations {@code non-null;} the list of annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseAnnotations(String attributeName, Annotations annotations,
        int byteLength) {
    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;
}
 
Example 3
Source File: BaseAnnotations.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param attributeName {@code non-null;} the name of the attribute
 * @param annotations {@code non-null;} the list of annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseAnnotations(String attributeName, Annotations annotations,
        int byteLength) {
    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;
}
 
Example 4
Source File: BaseAnnotations.java    From buck with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param attributeName {@code non-null;} the name of the attribute
 * @param annotations {@code non-null;} the list of annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseAnnotations(String attributeName, Annotations annotations,
        int byteLength) {
    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;
}