Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/lang/AssertionStatusDirectives.java
38829 views
/*1* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.lang;2627/**28* A collection of assertion status directives (such as "enable assertions29* in package p" or "disable assertions in class c"). This class is used by30* the JVM to communicate the assertion status directives implied by31* the <tt>java</tt> command line flags <tt>-enableassertions</tt>32* (<tt>-ea</tt>) and <tt>-disableassertions</tt> (<tt>-da</tt>).33*34* @since 1.435* @author Josh Bloch36*/37class AssertionStatusDirectives {38/**39* The classes for which assertions are to be enabled or disabled.40* The strings in this array are fully qualified class names (for41* example,"com.xyz.foo.Bar").42*/43String[] classes;4445/**46* A parallel array to <tt>classes</tt>, indicating whether each class47* is to have assertions enabled or disabled. A value of <tt>true</tt>48* for <tt>classEnabled[i]</tt> indicates that the class named by49* <tt>classes[i]</tt> should have assertions enabled; a value of50* <tt>false</tt> indicates that it should have classes disabled.51* This array must have the same number of elements as <tt>classes</tt>.52*53* <p>In the case of conflicting directives for the same class, the54* last directive for a given class wins. In other words, if a string55* <tt>s</tt> appears multiple times in the <tt>classes</tt> array56* and <tt>i</tt> is the highest integer for which57* <tt>classes[i].equals(s)</tt>, then <tt>classEnabled[i]</tt>58* indicates whether assertions are to be enabled in class <tt>s</tt>.59*/60boolean[] classEnabled;6162/**63* The package-trees for which assertions are to be enabled or disabled.64* The strings in this array are compete or partial package names65* (for example, "com.xyz" or "com.xyz.foo").66*/67String[] packages;6869/**70* A parallel array to <tt>packages</tt>, indicating whether each71* package-tree is to have assertions enabled or disabled. A value of72* <tt>true</tt> for <tt>packageEnabled[i]</tt> indicates that the73* package-tree named by <tt>packages[i]</tt> should have assertions74* enabled; a value of <tt>false</tt> indicates that it should have75* assertions disabled. This array must have the same number of76* elements as <tt>packages</tt>.77*78* In the case of conflicting directives for the same package-tree, the79* last directive for a given package-tree wins. In other words, if a80* string <tt>s</tt> appears multiple times in the <tt>packages</tt> array81* and <tt>i</tt> is the highest integer for which82* <tt>packages[i].equals(s)</tt>, then <tt>packageEnabled[i]</tt>83* indicates whether assertions are to be enabled in package-tree84* <tt>s</tt>.85*/86boolean[] packageEnabled;8788/**89* Whether or not assertions in non-system classes are to be enabled90* by default.91*/92boolean deflt;93}949596