forked from bjmashibing/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.html
More file actions
1006 lines (976 loc) · 49 KB
/
Module.html
File metadata and controls
1006 lines (976 loc) · 49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Module (Java SE 12 & JDK 12 )</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="java.lang.Module class">
<meta name="keywords" content="isNamed()">
<meta name="keywords" content="getName()">
<meta name="keywords" content="getClassLoader()">
<meta name="keywords" content="getDescriptor()">
<meta name="keywords" content="getLayer()">
<meta name="keywords" content="canRead()">
<meta name="keywords" content="addReads()">
<meta name="keywords" content="isExported()">
<meta name="keywords" content="isOpen()">
<meta name="keywords" content="addExports()">
<meta name="keywords" content="addOpens()">
<meta name="keywords" content="addUses()">
<meta name="keywords" content="canUse()">
<meta name="keywords" content="getPackages()">
<meta name="keywords" content="getAnnotation()">
<meta name="keywords" content="getAnnotations()">
<meta name="keywords" content="getDeclaredAnnotations()">
<meta name="keywords" content="getResourceAsStream()">
<meta name="keywords" content="toString()">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Module (Java SE 12 & JDK 12 )";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Module.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 & JDK 12</strong> </div></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="moduleLabelInType">Module</span> <a href="../../module-summary.html">java.base</a></div>
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">java.lang</a></div>
<h2 title="Class Module" class="title">Class Module</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>java.lang.Module</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="reflect/AnnotatedElement.html" title="interface in java.lang.reflect">AnnotatedElement</a></code></dd>
</dl>
<hr>
<pre>public final class <span class="typeNameLabel">Module</span>
extends <a href="Object.html" title="class in java.lang">Object</a>
implements <a href="reflect/AnnotatedElement.html" title="interface in java.lang.reflect">AnnotatedElement</a></pre>
<div class="block">Represents a run-time module, either <a href="#isNamed()"><code>named</code></a> or unnamed.
<p> Named modules have a <a href="#getName()"><code>name</code></a> and are constructed by the
Java Virtual Machine when a graph of modules is defined to the Java virtual
machine to create a <a href="ModuleLayer.html" title="class in java.lang">module layer</a>. </p>
<p> An unnamed module does not have a name. There is an unnamed module for
each <a href="ClassLoader.html" title="class in java.lang"><code>ClassLoader</code></a>, obtained by invoking its <a href="ClassLoader.html#getUnnamedModule()"><code>getUnnamedModule</code></a> method. All types that are
not in a named module are members of their defining class loader's unnamed
module. </p>
<p> The package names that are parameters or returned by methods defined in
this class are the fully-qualified names of the packages as defined in
section 6.5.3 of <cite>The Java™ Language Specification</cite>, for
example, <code>"java.lang"</code>. </p>
<p> Unless otherwise specified, passing a <code>null</code> argument to a method
in this class causes a <a href="NullPointerException.html" title="class in java.lang"><code>NullPointerException</code></a> to
be thrown. </p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>9</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Class.html#getModule()"><code>Class.getModule()</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code><a href="Module.html" title="class in java.lang">Module</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addExports(java.lang.String,java.lang.Module)">addExports</a></span>​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</code></th>
<td class="colLast">
<div class="block">If the caller's module is this module then update this module to export
the given package to the given module.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="Module.html" title="class in java.lang">Module</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addOpens(java.lang.String,java.lang.Module)">addOpens</a></span>​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</code></th>
<td class="colLast">
<div class="block">If this module has <em>opened</em> a package to at least the caller
module then update this module to open the package to the given module.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><a href="Module.html" title="class in java.lang">Module</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addReads(java.lang.Module)">addReads</a></span>​(<a href="Module.html" title="class in java.lang">Module</a> other)</code></th>
<td class="colLast">
<div class="block">If the caller's module is this module then update this module to read
the given module.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code><a href="Module.html" title="class in java.lang">Module</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addUses(java.lang.Class)">addUses</a></span>​(<a href="Class.html" title="class in java.lang">Class</a><?> service)</code></th>
<td class="colLast">
<div class="block">If the caller's module is this module then update this module to add a
service dependence on the given service type.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canRead(java.lang.Module)">canRead</a></span>​(<a href="Module.html" title="class in java.lang">Module</a> other)</code></th>
<td class="colLast">
<div class="block">Indicates if this module reads the given module.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canUse(java.lang.Class)">canUse</a></span>​(<a href="Class.html" title="class in java.lang">Class</a><?> service)</code></th>
<td class="colLast">
<div class="block">Indicates if this module has a service dependence on the given service
type.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code><T extends <a href="annotation/Annotation.html" title="interface in java.lang.annotation">Annotation</a>><br>T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAnnotation(java.lang.Class)">getAnnotation</a></span>​(<a href="Class.html" title="class in java.lang">Class</a><T> annotationClass)</code></th>
<td class="colLast">
<div class="block">Returns this element's annotation for the specified type if
such an annotation is <em>present</em>, else null.</div>
</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code><a href="annotation/Annotation.html" title="interface in java.lang.annotation">Annotation</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAnnotations()">getAnnotations</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns annotations that are <em>present</em> on this element.</div>
</td>
</tr>
<tr class="altColor" id="i8">
<td class="colFirst"><code><a href="ClassLoader.html" title="class in java.lang">ClassLoader</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getClassLoader()">getClassLoader</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <code>ClassLoader</code> for this module.</div>
</td>
</tr>
<tr class="rowColor" id="i9">
<td class="colFirst"><code><a href="annotation/Annotation.html" title="interface in java.lang.annotation">Annotation</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDeclaredAnnotations()">getDeclaredAnnotations</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns annotations that are <em>directly present</em> on this element.</div>
</td>
</tr>
<tr class="altColor" id="i10">
<td class="colFirst"><code><a href="module/ModuleDescriptor.html" title="class in java.lang.module">ModuleDescriptor</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDescriptor()">getDescriptor</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the module descriptor for this module or <code>null</code> if this
module is an unnamed module.</div>
</td>
</tr>
<tr class="rowColor" id="i11">
<td class="colFirst"><code><a href="ModuleLayer.html" title="class in java.lang">ModuleLayer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLayer()">getLayer</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the module layer that contains this module or <code>null</code> if
this module is not in a module layer.</div>
</td>
</tr>
<tr class="altColor" id="i12">
<td class="colFirst"><code><a href="String.html" title="class in java.lang">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getName()">getName</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the module name or <code>null</code> if this module is an unnamed
module.</div>
</td>
</tr>
<tr class="rowColor" id="i13">
<td class="colFirst"><code><a href="../util/Set.html" title="interface in java.util">Set</a><<a href="String.html" title="class in java.lang">String</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPackages()">getPackages</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the set of package names for the packages in this module.</div>
</td>
</tr>
<tr class="altColor" id="i14">
<td class="colFirst"><code><a href="../io/InputStream.html" title="class in java.io">InputStream</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResourceAsStream(java.lang.String)">getResourceAsStream</a></span>​(<a href="String.html" title="class in java.lang">String</a> name)</code></th>
<td class="colLast">
<div class="block">Returns an input stream for reading a resource in this module.</div>
</td>
</tr>
<tr class="rowColor" id="i15">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isExported(java.lang.String)">isExported</a></span>​(<a href="String.html" title="class in java.lang">String</a> pn)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this module exports the given package
unconditionally.</div>
</td>
</tr>
<tr class="altColor" id="i16">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isExported(java.lang.String,java.lang.Module)">isExported</a></span>​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this module exports the given package to at
least the given module.</div>
</td>
</tr>
<tr class="rowColor" id="i17">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNamed()">isNamed</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this module is a named module.</div>
</td>
</tr>
<tr class="altColor" id="i18">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOpen(java.lang.String)">isOpen</a></span>​(<a href="String.html" title="class in java.lang">String</a> pn)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this module has <em>opened</em> a package
unconditionally.</div>
</td>
</tr>
<tr class="rowColor" id="i19">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOpen(java.lang.String,java.lang.Module)">isOpen</a></span>​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this module has <em>opened</em> a package to at
least the given module.</div>
</td>
</tr>
<tr class="altColor" id="i20">
<td class="colFirst"><code><a href="String.html" title="class in java.lang">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the string representation of this module.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods declared in class java.lang.<a href="Object.html" title="class in java.lang">Object</a></h3>
<code><a href="Object.html#clone()">clone</a>, <a href="Object.html#equals(java.lang.Object)">equals</a>, <a href="Object.html#finalize()">finalize</a>, <a href="Object.html#getClass()">getClass</a>, <a href="Object.html#hashCode()">hashCode</a>, <a href="Object.html#notify()">notify</a>, <a href="Object.html#notifyAll()">notifyAll</a>, <a href="Object.html#wait()">wait</a>, <a href="Object.html#wait(long)">wait</a>, <a href="Object.html#wait(long,int)">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.reflect.AnnotatedElement">
<!-- -->
</a>
<h3>Methods declared in interface java.lang.reflect.<a href="reflect/AnnotatedElement.html" title="interface in java.lang.reflect">AnnotatedElement</a></h3>
<code><a href="reflect/AnnotatedElement.html#getAnnotationsByType(java.lang.Class)">getAnnotationsByType</a>, <a href="reflect/AnnotatedElement.html#getDeclaredAnnotation(java.lang.Class)">getDeclaredAnnotation</a>, <a href="reflect/AnnotatedElement.html#getDeclaredAnnotationsByType(java.lang.Class)">getDeclaredAnnotationsByType</a>, <a href="reflect/AnnotatedElement.html#isAnnotationPresent(java.lang.Class)">isAnnotationPresent</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="isNamed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNamed</h4>
<pre class="methodSignature">public boolean isNamed()</pre>
<div class="block">Returns <code>true</code> if this module is a named module.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this is a named module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="ClassLoader.html#getUnnamedModule()"><code>ClassLoader.getUnnamedModule()</code></a></dd>
</dl>
</li>
</ul>
<a id="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre class="methodSignature">public <a href="String.html" title="class in java.lang">String</a> getName()</pre>
<div class="block">Returns the module name or <code>null</code> if this module is an unnamed
module.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The module name</dd>
</dl>
</li>
</ul>
<a id="getClassLoader()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoader</h4>
<pre class="methodSignature">public <a href="ClassLoader.html" title="class in java.lang">ClassLoader</a> getClassLoader()</pre>
<div class="block">Returns the <code>ClassLoader</code> for this module.
<p> If there is a security manager then its <code>checkPermission</code>
method if first called with a <code>RuntimePermission("getClassLoader")</code>
permission to check that the caller is allowed to get access to the
class loader. </p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The class loader for this module</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="SecurityException.html" title="class in java.lang">SecurityException</a></code> - If denied by the security manager</dd>
</dl>
</li>
</ul>
<a id="getDescriptor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDescriptor</h4>
<pre class="methodSignature">public <a href="module/ModuleDescriptor.html" title="class in java.lang.module">ModuleDescriptor</a> getDescriptor()</pre>
<div class="block">Returns the module descriptor for this module or <code>null</code> if this
module is an unnamed module.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The module descriptor for this module</dd>
</dl>
</li>
</ul>
<a id="getLayer()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLayer</h4>
<pre class="methodSignature">public <a href="ModuleLayer.html" title="class in java.lang">ModuleLayer</a> getLayer()</pre>
<div class="block">Returns the module layer that contains this module or <code>null</code> if
this module is not in a module layer.
A module layer contains named modules and therefore this method always
returns <code>null</code> when invoked on an unnamed module.
<p> <a href="reflect/Proxy.html#dynamicmodule">Dynamic modules</a> are
named modules that are generated at runtime. A dynamic module may or may
not be in a module layer. </p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The module layer that contains this module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="reflect/Proxy.html" title="class in java.lang.reflect"><code>Proxy</code></a></dd>
</dl>
</li>
</ul>
<a id="canRead(java.lang.Module)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canRead</h4>
<pre class="methodSignature">public boolean canRead​(<a href="Module.html" title="class in java.lang">Module</a> other)</pre>
<div class="block">Indicates if this module reads the given module. This method returns
<code>true</code> if invoked to test if this module reads itself. It also
returns <code>true</code> if invoked on an unnamed module (as unnamed
modules read all modules).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - The other module</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this module reads <code>other</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#addReads(java.lang.Module)"><code>addReads(Module)</code></a></dd>
</dl>
</li>
</ul>
<a id="addReads(java.lang.Module)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addReads</h4>
<pre class="methodSignature">public <a href="Module.html" title="class in java.lang">Module</a> addReads​(<a href="Module.html" title="class in java.lang">Module</a> other)</pre>
<div class="block">If the caller's module is this module then update this module to read
the given module.
This method is a no-op if <code>other</code> is this module (all modules read
themselves), this module is an unnamed module (as unnamed modules read
all modules), or this module already reads <code>other</code>.</div>
<dl>
<dt><span class="simpleTagLabel">Implementation Note:</span></dt>
<dd><em>Read edges</em> added by this method are <em>weak</em> and
do not prevent <code>other</code> from being GC'ed when this module is
strongly reachable.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - The other module</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this module</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalCallerException.html" title="class in java.lang">IllegalCallerException</a></code> - If this is a named module and the caller's module is not this
module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#canRead(java.lang.Module)"><code>canRead(java.lang.Module)</code></a></dd>
</dl>
</li>
</ul>
<a id="isExported(java.lang.String,java.lang.Module)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isExported</h4>
<pre class="methodSignature">public boolean isExported​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</pre>
<div class="block">Returns <code>true</code> if this module exports the given package to at
least the given module.
<p> This method returns <code>true</code> if invoked to test if a package in
this module is exported to itself. It always returns <code>true</code> when
invoked on an unnamed module. A package that is <a href="#isOpen(java.lang.String,java.lang.Module)"><code>open</code></a> to
the given module is considered exported to that module at run-time and
so this method returns <code>true</code> if the package is open to the given
module. </p>
<p> This method does not check if the given module reads this module. </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pn</code> - The package name</dd>
<dd><code>other</code> - The other module</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this module exports the package to at least the
given module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="module/ModuleDescriptor.html#exports()"><code>ModuleDescriptor.exports()</code></a>,
<a href="#addExports(java.lang.String,java.lang.Module)"><code>addExports(String,Module)</code></a></dd>
</dl>
</li>
</ul>
<a id="isOpen(java.lang.String,java.lang.Module)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOpen</h4>
<pre class="methodSignature">public boolean isOpen​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</pre>
<div class="block">Returns <code>true</code> if this module has <em>opened</em> a package to at
least the given module.
<p> This method returns <code>true</code> if invoked to test if a package in
this module is open to itself. It returns <code>true</code> when invoked on an
<a href="module/ModuleDescriptor.html#isOpen()"><code>open</code></a> module with a package in the module.
It always returns <code>true</code> when invoked on an unnamed module. </p>
<p> This method does not check if the given module reads this module. </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pn</code> - The package name</dd>
<dd><code>other</code> - The other module</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this module has <em>opened</em> the package
to at least the given module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="module/ModuleDescriptor.html#opens()"><code>ModuleDescriptor.opens()</code></a>,
<a href="#addOpens(java.lang.String,java.lang.Module)"><code>addOpens(String,Module)</code></a>,
<a href="reflect/AccessibleObject.html#setAccessible(boolean)"><code>AccessibleObject.setAccessible(boolean)</code></a>,
<a href="invoke/MethodHandles.html#privateLookupIn(java.lang.Class,java.lang.invoke.MethodHandles.Lookup)"><code>MethodHandles.privateLookupIn(java.lang.Class<?>, java.lang.invoke.MethodHandles.Lookup)</code></a></dd>
</dl>
</li>
</ul>
<a id="isExported(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isExported</h4>
<pre class="methodSignature">public boolean isExported​(<a href="String.html" title="class in java.lang">String</a> pn)</pre>
<div class="block">Returns <code>true</code> if this module exports the given package
unconditionally.
<p> This method always returns <code>true</code> when invoked on an unnamed
module. A package that is <a href="#isOpen(java.lang.String)"><code>opened</code></a> unconditionally
is considered exported unconditionally at run-time and so this method
returns <code>true</code> if the package is opened unconditionally. </p>
<p> This method does not check if the given module reads this module. </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pn</code> - The package name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this module exports the package unconditionally</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="module/ModuleDescriptor.html#exports()"><code>ModuleDescriptor.exports()</code></a></dd>
</dl>
</li>
</ul>
<a id="isOpen(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOpen</h4>
<pre class="methodSignature">public boolean isOpen​(<a href="String.html" title="class in java.lang">String</a> pn)</pre>
<div class="block">Returns <code>true</code> if this module has <em>opened</em> a package
unconditionally.
<p> This method always returns <code>true</code> when invoked on an unnamed
module. Additionally, it always returns <code>true</code> when invoked on an
<a href="module/ModuleDescriptor.html#isOpen()"><code>open</code></a> module with a package in the
module. </p>
<p> This method does not check if the given module reads this module. </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pn</code> - The package name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this module has <em>opened</em> the package
unconditionally</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="module/ModuleDescriptor.html#opens()"><code>ModuleDescriptor.opens()</code></a></dd>
</dl>
</li>
</ul>
<a id="addExports(java.lang.String,java.lang.Module)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addExports</h4>
<pre class="methodSignature">public <a href="Module.html" title="class in java.lang">Module</a> addExports​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</pre>
<div class="block">If the caller's module is this module then update this module to export
the given package to the given module.
<p> This method has no effect if the package is already exported (or
<em>open</em>) to the given module. </p></div>
<dl>
<dt><span class="simpleTagLabel">API Note:</span></dt>
<dd>As specified in section 5.4.3 of the <cite>The Java™
Virtual Machine Specification </cite>, if an attempt to resolve a
symbolic reference fails because of a linkage error, then subsequent
attempts to resolve the reference always fail with the same error that
was thrown as a result of the initial resolution attempt.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pn</code> - The package name</dd>
<dd><code>other</code> - The module</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this module</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - If <code>pn</code> is <code>null</code>, or this is a named module and the
package <code>pn</code> is not a package in this module</dd>
<dd><code><a href="IllegalCallerException.html" title="class in java.lang">IllegalCallerException</a></code> - If this is a named module and the caller's module is not this
module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isExported(java.lang.String,java.lang.Module)"><code>isExported(String,Module)</code></a></dd>
<dt><span class="simpleTagLabel">See <cite>The Java™ Virtual Machine Specification</cite>:</span></dt>
<dd>5.4.3 Resolution</dd>
</dl>
</li>
</ul>
<a id="addOpens(java.lang.String,java.lang.Module)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addOpens</h4>
<pre class="methodSignature">public <a href="Module.html" title="class in java.lang">Module</a> addOpens​(<a href="String.html" title="class in java.lang">String</a> pn,
<a href="Module.html" title="class in java.lang">Module</a> other)</pre>
<div class="block">If this module has <em>opened</em> a package to at least the caller
module then update this module to open the package to the given module.
Opening a package with this method allows all types in the package,
and all their members, not just public types and their public members,
to be reflected on by the given module when using APIs that support
private access or a way to bypass or suppress default Java language
access control checks.
<p> This method has no effect if the package is already <em>open</em>
to the given module. </p></div>
<dl>
<dt><span class="simpleTagLabel">API Note:</span></dt>
<dd>This method can be used for cases where a <em>consumer
module</em> uses a qualified opens to open a package to an <em>API
module</em> but where the reflective access to the members of classes in
the consumer module is delegated to code in another module. Code in the
API module can use this method to open the package in the consumer module
to the other module.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pn</code> - The package name</dd>
<dd><code>other</code> - The module</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this module</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - If <code>pn</code> is <code>null</code>, or this is a named module and the
package <code>pn</code> is not a package in this module</dd>
<dd><code><a href="IllegalCallerException.html" title="class in java.lang">IllegalCallerException</a></code> - If this is a named module and this module has not opened the
package to at least the caller's module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isOpen(java.lang.String,java.lang.Module)"><code>isOpen(String,Module)</code></a>,
<a href="reflect/AccessibleObject.html#setAccessible(boolean)"><code>AccessibleObject.setAccessible(boolean)</code></a>,
<a href="invoke/MethodHandles.html#privateLookupIn(java.lang.Class,java.lang.invoke.MethodHandles.Lookup)"><code>MethodHandles.privateLookupIn(java.lang.Class<?>, java.lang.invoke.MethodHandles.Lookup)</code></a></dd>
</dl>
</li>
</ul>
<a id="addUses(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addUses</h4>
<pre class="methodSignature">public <a href="Module.html" title="class in java.lang">Module</a> addUses​(<a href="Class.html" title="class in java.lang">Class</a><?> service)</pre>
<div class="block">If the caller's module is this module then update this module to add a
service dependence on the given service type. This method is intended
for use by frameworks that invoke <a href="../util/ServiceLoader.html" title="class in java.util"><code>ServiceLoader</code></a> on behalf of other modules or where the framework is
passed a reference to the service type by other code. This method is
a no-op when invoked on an unnamed module or an automatic module.
<p> This method does not cause <a href="module/Configuration.html#resolveAndBind(java.lang.module.ModuleFinder,java.lang.module.ModuleFinder,java.util.Collection)"><code>resolveAndBind</code></a> to be re-run. </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>service</code> - The service type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this module</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalCallerException.html" title="class in java.lang">IllegalCallerException</a></code> - If this is a named module and the caller's module is not this
module</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#canUse(java.lang.Class)"><code>canUse(Class)</code></a>,
<a href="module/ModuleDescriptor.html#uses()"><code>ModuleDescriptor.uses()</code></a></dd>
</dl>
</li>
</ul>
<a id="canUse(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canUse</h4>
<pre class="methodSignature">public boolean canUse​(<a href="Class.html" title="class in java.lang">Class</a><?> service)</pre>
<div class="block">Indicates if this module has a service dependence on the given service
type. This method always returns <code>true</code> when invoked on an unnamed
module or an automatic module.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>service</code> - The service type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this module uses service type <code>st</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#addUses(java.lang.Class)"><code>addUses(Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="getPackages()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPackages</h4>
<pre class="methodSignature">public <a href="../util/Set.html" title="interface in java.util">Set</a><<a href="String.html" title="class in java.lang">String</a>> getPackages()</pre>
<div class="block">Returns the set of package names for the packages in this module.
<p> For named modules, the returned set contains an element for each
package in the module. </p>
<p> For unnamed modules, this method is the equivalent to invoking the
<a href="ClassLoader.html#getDefinedPackages()"><code>getDefinedPackages</code></a> method of
this module's class loader and returning the set of package names. </p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the set of the package names of the packages in this module</dd>
</dl>
</li>
</ul>
<a id="getAnnotation(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAnnotation</h4>
<pre class="methodSignature">public <T extends <a href="annotation/Annotation.html" title="interface in java.lang.annotation">Annotation</a>> T getAnnotation​(<a href="Class.html" title="class in java.lang">Class</a><T> annotationClass)</pre>
<div class="block">Returns this element's annotation for the specified type if
such an annotation is <em>present</em>, else null.
This method returns <code>null</code> when invoked on an unnamed module.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="reflect/AnnotatedElement.html#getAnnotation(java.lang.Class)">getAnnotation</a></code> in interface <code><a href="reflect/AnnotatedElement.html" title="interface in java.lang.reflect">AnnotatedElement</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the annotation to query for and return if present</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>annotationClass</code> - the Class object corresponding to the
annotation type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this element's annotation for the specified annotation type if
present on this element, else null</dd>
</dl>
</li>
</ul>
<a id="getAnnotations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAnnotations</h4>
<pre class="methodSignature">public <a href="annotation/Annotation.html" title="interface in java.lang.annotation">Annotation</a>[] getAnnotations()</pre>
<div class="block">Returns annotations that are <em>present</em> on this element.
If there are no annotations <em>present</em> on this element, the return
value is an array of length 0.
The caller of this method is free to modify the returned array; it will
have no effect on the arrays returned to other callers.
This method returns an empty array when invoked on an unnamed module.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="reflect/AnnotatedElement.html#getAnnotations()">getAnnotations</a></code> in interface <code><a href="reflect/AnnotatedElement.html" title="interface in java.lang.reflect">AnnotatedElement</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>annotations present on this element</dd>
</dl>
</li>
</ul>
<a id="getDeclaredAnnotations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeclaredAnnotations</h4>
<pre class="methodSignature">public <a href="annotation/Annotation.html" title="interface in java.lang.annotation">Annotation</a>[] getDeclaredAnnotations()</pre>
<div class="block">Returns annotations that are <em>directly present</em> on this element.
This method ignores inherited annotations.
If there are no annotations <em>directly present</em> on this element,
the return value is an array of length 0.
The caller of this method is free to modify the returned array; it will
have no effect on the arrays returned to other callers.
This method returns an empty array when invoked on an unnamed module.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="reflect/AnnotatedElement.html#getDeclaredAnnotations()">getDeclaredAnnotations</a></code> in interface <code><a href="reflect/AnnotatedElement.html" title="interface in java.lang.reflect">AnnotatedElement</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>annotations directly present on this element</dd>
</dl>
</li>
</ul>
<a id="getResourceAsStream(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResourceAsStream</h4>
<pre class="methodSignature">public <a href="../io/InputStream.html" title="class in java.io">InputStream</a> getResourceAsStream​(<a href="String.html" title="class in java.lang">String</a> name)
throws <a href="../io/IOException.html" title="class in java.io">IOException</a></pre>
<div class="block">Returns an input stream for reading a resource in this module.
The <code>name</code> parameter is a <code>'/'</code>-separated path name that
identifies the resource. As with <a href="Class.html#getResourceAsStream(java.lang.String)"><code>Class.getResourceAsStream</code></a>, this method delegates to the module's class
loader <a href="ClassLoader.html#findResource(java.lang.String,java.lang.String)"><code>findResource(String,String)</code></a> method, invoking it with the module name
(or <code>null</code> when the module is unnamed) and the name of the
resource. If the resource name has a leading slash then it is dropped
before delegation.
<p> A resource in a named module may be <em>encapsulated</em> so that
it cannot be located by code in other modules. Whether a resource can be
located or not is determined as follows: </p>
<ul>
<li> If the resource name ends with "<code>.class</code>" then it is not
encapsulated. </li>
<li> A <em>package name</em> is derived from the resource name. If
the package name is a <a href="#getPackages()">package</a> in the
module then the resource can only be located by the caller of this
method when the package is <a href="#isOpen(java.lang.String,java.lang.Module)">open</a>
to at least the caller's module. If the resource is not in a
package in the module then the resource is not encapsulated. </li>
</ul>
<p> In the above, the <em>package name</em> for a resource is derived
from the subsequence of characters that precedes the last <code>'/'</code> in
the name and then replacing each <code>'/'</code> character in the subsequence
with <code>'.'</code>. A leading slash is ignored when deriving the package
name. As an example, the package name derived for a resource named
"<code>a/b/c/foo.properties</code>" is "<code>a.b.c</code>". A resource name
with the name "<code>META-INF/MANIFEST.MF</code>" is never encapsulated
because "<code>META-INF</code>" is not a legal package name. </p>
<p> This method returns <code>null</code> if the resource is not in this
module, the resource is encapsulated and cannot be located by the caller,
or access to the resource is denied by the security manager. </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The resource name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An input stream for reading the resource or <code>null</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../io/IOException.html" title="class in java.io">IOException</a></code> - If an I/O error occurs</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Class.html#getResourceAsStream(java.lang.String)"><code>Class.getResourceAsStream(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public <a href="String.html" title="class in java.lang">String</a> toString()</pre>
<div class="block">Returns the string representation of this module. For a named module,
the representation is the string <code>"module"</code>, followed by a space,
and then the module name. For an unnamed module, the representation is
the string <code>"unnamed module"</code>, followed by a space, and then an
implementation specific string that identifies the unnamed module.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="Object.html#toString()">toString</a></code> in class <code><a href="Object.html" title="class in java.lang">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The string representation of this module</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Module.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 & JDK 12</strong> </div></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>