jdk/src/share/classes/java/lang/AssertionStatusDirectives.java
author mduigou
Wed, 21 Aug 2013 12:03:19 -0700
changeset 19572 e43d5c2e79ca
parent 5506 202f599c92aa
permissions -rw-r--r--
8023306: Add replace() implementations to TreeMap Reviewed-by: psandoz, alanb, chegar, bpb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.lang;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * A collection of assertion status directives (such as "enable assertions
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * in package p" or "disable assertions in class c").  This class is used by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * the JVM to communicate the assertion status directives implied by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * the <tt>java</tt> command line flags <tt>-enableassertions</tt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * (<tt>-ea</tt>) and <tt>-disableassertions</tt> (<tt>-da</tt>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * @since  1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * @author Josh Bloch
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
class AssertionStatusDirectives {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
     * The classes for which assertions are to be enabled or disabled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
     * The strings in this array are fully qualified class names (for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
     * example,"com.xyz.foo.Bar").
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    String[] classes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
     * A parallel array to <tt>classes</tt>, indicating whether each class
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
     * is to have assertions enabled or disabled.  A value of <tt>true</tt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
     * for <tt>classEnabled[i]</tt> indicates that the class named by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     * <tt>classes[i]</tt> should have assertions enabled; a value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
     * <tt>false</tt> indicates that it should have classes disabled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
     * This array must have the same number of elements as <tt>classes</tt>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     * <p>In the case of conflicting directives for the same class, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     * last directive for a given class wins.  In other words, if a string
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     * <tt>s</tt> appears multiple times in the <tt>classes</tt> array
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     * and <tt>i</tt> is the highest integer for which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
     * <tt>classes[i].equals(s)</tt>, then <tt>classEnabled[i]</tt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
     * indicates whether assertions are to be enabled in class <tt>s</tt>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    boolean[] classEnabled;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     * The package-trees for which assertions are to be enabled or disabled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * The strings in this array are compete or partial package names
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     * (for example, "com.xyz" or "com.xyz.foo").
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    String[] packages;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
     * A parallel array to <tt>packages</tt>, indicating whether each
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * package-tree is to have assertions enabled or disabled.  A value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     * <tt>true</tt> for <tt>packageEnabled[i]</tt> indicates that the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * package-tree named by <tt>packages[i]</tt> should have assertions
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     * enabled; a value of <tt>false</tt> indicates that it should have
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * assertions disabled.  This array must have the same number of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * elements as <tt>packages</tt>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * In the case of conflicting directives for the same package-tree, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * last directive for a given package-tree wins.  In other words, if a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * string <tt>s</tt> appears multiple times in the <tt>packages</tt> array
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * and <tt>i</tt> is the highest integer for which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * <tt>packages[i].equals(s)</tt>, then <tt>packageEnabled[i]</tt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * indicates whether assertions are to be enabled in package-tree
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * <tt>s</tt>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    boolean[] packageEnabled;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * Whether or not assertions in non-system classes are to be enabled
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * by default.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    boolean deflt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
}