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