jdk/src/java.instrument/share/classes/java/lang/instrument/UnmodifiableModuleException.java
author alanb
Fri, 07 Apr 2017 08:05:54 +0000
changeset 44545 83b611b88ac8
permissions -rw-r--r--
8177530: Module system implementation refresh (4/2017) Reviewed-by: mchung, alanb Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44545
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     1
/*
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     2
 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     4
 *
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    10
 *
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    15
 * accompanied this code).
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    16
 *
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    20
 *
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    23
 * questions.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    24
 */
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    25
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    26
package java.lang.instrument;
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    27
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    28
/**
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    29
 * Thrown to indicate that a module cannot be modified.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    30
 *
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    31
 * @see Instrumentation#redefineModule
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    32
 * @since 9
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    33
 * @spec JPMS
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    34
 */
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    35
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    36
public class UnmodifiableModuleException extends RuntimeException {
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    37
    private static final long serialVersionUID = 6912511912351080644L;
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    38
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    39
    /**
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    40
     * Constructs an {@code UnmodifiableModuleException} with no
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    41
     * detail message.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    42
     */
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    43
    public UnmodifiableModuleException() {
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    44
        super();
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    45
    }
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    46
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    47
    /**
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    48
     * Constructs an {@code UnmodifiableModuleException} with the
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    49
     * specified detail message.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    50
     *
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    51
     * @param  msg the detail message.
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    52
     */
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    53
    public UnmodifiableModuleException(String msg) {
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    54
        super(msg);
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    55
    }
83b611b88ac8 8177530: Module system implementation refresh (4/2017)
alanb
parents:
diff changeset
    56
}