com.android.dx.util.MutabilityException Java Examples

The following examples show how to use com.android.dx.util.MutabilityException. 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: BaseParameterAnnotations.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 parameterAnnotations {@code non-null;} the annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseParameterAnnotations(String attributeName,
        AnnotationsList parameterAnnotations, int byteLength) {
    super(attributeName);

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

    this.parameterAnnotations = parameterAnnotations;
    this.byteLength = byteLength;
}
 
Example #2
Source File: BaseLocalVariables.java    From buck with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param name {@code non-null;} attribute name
 * @param localVariables {@code non-null;} list of local variable entries
 */
public BaseLocalVariables(String name,
        LocalVariableList localVariables) {
    super(name);

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

    this.localVariables = localVariables;
}
 
Example #3
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;
}
 
Example #4
Source File: BaseParameterAnnotations.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 parameterAnnotations {@code non-null;} the annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseParameterAnnotations(String attributeName,
        AnnotationsList parameterAnnotations, int byteLength) {
    super(attributeName);

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

    this.parameterAnnotations = parameterAnnotations;
    this.byteLength = byteLength;
}
 
Example #5
Source File: BaseLocalVariables.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param name {@code non-null;} attribute name
 * @param localVariables {@code non-null;} list of local variable entries
 */
public BaseLocalVariables(String name,
        LocalVariableList localVariables) {
    super(name);

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

    this.localVariables = localVariables;
}
 
Example #6
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 #7
Source File: BaseParameterAnnotations.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 parameterAnnotations {@code non-null;} the annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseParameterAnnotations(String attributeName,
        AnnotationsList parameterAnnotations, int byteLength) {
    super(attributeName);

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

    this.parameterAnnotations = parameterAnnotations;
    this.byteLength = byteLength;
}
 
Example #8
Source File: BaseLocalVariables.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param name {@code non-null;} attribute name
 * @param localVariables {@code non-null;} list of local variable entries
 */
public BaseLocalVariables(String name,
        LocalVariableList localVariables) {
    super(name);

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

    this.localVariables = localVariables;
}
 
Example #9
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 #10
Source File: BaseParameterAnnotations.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 parameterAnnotations {@code non-null;} the annotations
 * @param byteLength {@code >= 0;} attribute data length in the original
 * classfile (not including the attribute header)
 */
public BaseParameterAnnotations(String attributeName,
        AnnotationsList parameterAnnotations, int byteLength) {
    super(attributeName);

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

    this.parameterAnnotations = parameterAnnotations;
    this.byteLength = byteLength;
}
 
Example #11
Source File: BaseLocalVariables.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param name {@code non-null;} attribute name
 * @param localVariables {@code non-null;} list of local variable entries
 */
public BaseLocalVariables(String name,
        LocalVariableList localVariables) {
    super(name);

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

    this.localVariables = localVariables;
}
 
Example #12
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 #13
Source File: AttExceptions.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param exceptions {@code non-null;} list of classes, presumed but not
 * verified to be subclasses of {@code Throwable}
 */
public AttExceptions(TypeList exceptions) {
    super(ATTRIBUTE_NAME);

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

    this.exceptions = exceptions;
}
 
Example #14
Source File: AttLineNumberTable.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param lineNumbers {@code non-null;} list of line number entries
 */
public AttLineNumberTable(LineNumberList lineNumbers) {
    super(ATTRIBUTE_NAME);

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

    this.lineNumbers = lineNumbers;
}
 
Example #15
Source File: AttInnerClasses.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param innerClasses {@code non-null;} list of inner class entries
 */
public AttInnerClasses(InnerClassList innerClasses) {
    super(ATTRIBUTE_NAME);

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

    this.innerClasses = innerClasses;
}
 
Example #16
Source File: AttExceptions.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param exceptions {@code non-null;} list of classes, presumed but not
 * verified to be subclasses of {@code Throwable}
 */
public AttExceptions(TypeList exceptions) {
    super(ATTRIBUTE_NAME);

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

    this.exceptions = exceptions;
}
 
Example #17
Source File: AttLineNumberTable.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param lineNumbers {@code non-null;} list of line number entries
 */
public AttLineNumberTable(LineNumberList lineNumbers) {
    super(ATTRIBUTE_NAME);

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

    this.lineNumbers = lineNumbers;
}
 
Example #18
Source File: AttInnerClasses.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param innerClasses {@code non-null;} list of inner class entries
 */
public AttInnerClasses(InnerClassList innerClasses) {
    super(ATTRIBUTE_NAME);

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

    this.innerClasses = innerClasses;
}
 
Example #19
Source File: AttInnerClasses.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param innerClasses {@code non-null;} list of inner class entries
 */
public AttInnerClasses(InnerClassList innerClasses) {
    super(ATTRIBUTE_NAME);

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

    this.innerClasses = innerClasses;
}
 
Example #20
Source File: AttLineNumberTable.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param lineNumbers {@code non-null;} list of line number entries
 */
public AttLineNumberTable(LineNumberList lineNumbers) {
    super(ATTRIBUTE_NAME);

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

    this.lineNumbers = lineNumbers;
}
 
Example #21
Source File: AttExceptions.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param exceptions {@code non-null;} list of classes, presumed but not
 * verified to be subclasses of {@code Throwable}
 */
public AttExceptions(TypeList exceptions) {
    super(ATTRIBUTE_NAME);

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

    this.exceptions = exceptions;
}
 
Example #22
Source File: AttExceptions.java    From buck with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param exceptions {@code non-null;} list of classes, presumed but not
 * verified to be subclasses of {@code Throwable}
 */
public AttExceptions(TypeList exceptions) {
    super(ATTRIBUTE_NAME);

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

    this.exceptions = exceptions;
}
 
Example #23
Source File: AttLineNumberTable.java    From buck with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param lineNumbers {@code non-null;} list of line number entries
 */
public AttLineNumberTable(LineNumberList lineNumbers) {
    super(ATTRIBUTE_NAME);

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

    this.lineNumbers = lineNumbers;
}
 
Example #24
Source File: AttInnerClasses.java    From buck with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an instance.
 *
 * @param innerClasses {@code non-null;} list of inner class entries
 */
public AttInnerClasses(InnerClassList innerClasses) {
    super(ATTRIBUTE_NAME);

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

    this.innerClasses = innerClasses;
}