1
1
/*
2
- * Copyright (c) 2009, 2018 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2009, 2020 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
68
68
* #read(InputStream,Supplier) read} methods defined here. </p>
69
69
*
70
70
* <p> A module descriptor describes a <em>normal</em>, open, or automatic
71
- * module. <em>Normal</em> modules and open modules describe their {@link
71
+ * module. <em>Normal</em> modules and open modules describe their {@linkplain
72
72
* #requires() dependences}, {@link #exports() exported-packages}, the services
73
- * that they {@link #uses() use} or {@link #provides() provide}, and other
74
- * components. <em>Normal</em> modules may {@link #opens() open} specific
75
- * packages. The module descriptor for an open modules does not declare any
73
+ * that they {@linkplain #uses() use} or {@linkplain #provides() provide}, and other
74
+ * components. <em>Normal</em> modules may {@linkplain #opens() open} specific
75
+ * packages. The module descriptor for an open module does not declare any
76
76
* open packages (its {@code opens} method returns an empty set) but when
77
77
* instantiated in the Java virtual machine then it is treated as if all
78
78
* packages are open. The module descriptor for an automatic module does not
79
79
* declare any dependences (except for the mandatory dependency on {@code
80
80
* java.base}), and does not declare any exported or open packages. Automatic
81
- * module receive special treatment during resolution so that they read all
81
+ * modules receive special treatment during resolution so that they read all
82
82
* other modules in the configuration. When an automatic module is instantiated
83
83
* in the Java virtual machine then it reads every unnamed module and is
84
84
* treated as if all packages are exported and open. </p>
@@ -131,7 +131,7 @@ public enum Modifier {
131
131
132
132
133
133
/**
134
- * <p> A dependence upon a module </p>
134
+ * <p> A dependence upon a module. </p>
135
135
*
136
136
* @see ModuleDescriptor#requires()
137
137
* @since 9
@@ -607,7 +607,7 @@ public enum Modifier {
607
607
private final Set <String > targets ; // empty if unqualified export
608
608
609
609
/**
610
- * Constructs an Opens
610
+ * Constructs an {@code Opens}.
611
611
*/
612
612
private Opens (Set <Modifier > ms , String source , Set <String > targets ) {
613
613
this .mods = Set .copyOf (ms );
@@ -634,9 +634,9 @@ public Set<Modifier> modifiers() {
634
634
}
635
635
636
636
/**
637
- * Returns {@code true} if this is a qualified opens .
637
+ * Returns {@code true} if this is a qualified {@code Opens} .
638
638
*
639
- * @return {@code true} if this is a qualified opens
639
+ * @return {@code true} if this is a qualified {@code Opens}
640
640
*/
641
641
public boolean isQualified () {
642
642
return !targets .isEmpty ();
@@ -652,19 +652,19 @@ public String source() {
652
652
}
653
653
654
654
/**
655
- * For a qualified opens , returns the non-empty and immutable set
655
+ * For a qualified {@code Opens} , returns the non-empty and immutable set
656
656
* of the module names to which the package is open. For an
657
- * unqualified opens , returns an empty set.
657
+ * unqualified {@code Opens} , returns an empty set.
658
658
*
659
659
* @return The set of target module names or for an unqualified
660
- * opens , an empty set
660
+ * {@code Opens} , an empty set
661
661
*/
662
662
public Set <String > targets () {
663
663
return targets ;
664
664
}
665
665
666
666
/**
667
- * Compares this module opens to another.
667
+ * Compares this module {@code Opens} to another.
668
668
*
669
669
* <p> Two {@code Opens} objects are compared by comparing the package
670
670
* names lexicographically. Where the packages names are equal then the
@@ -680,11 +680,11 @@ public Set<String> targets() {
680
680
* set. </p>
681
681
*
682
682
* @param that
683
- * The module opens to compare
683
+ * The module {@code Opens} to compare
684
684
*
685
685
* @return A negative integer, zero, or a positive integer if this module
686
- * opens is less than, equal to, or greater than the given
687
- * module opens
686
+ * {@code Opens} is less than, equal to, or greater than the given
687
+ * module {@code Opens}
688
688
*/
689
689
@ Override
690
690
public int compareTo (Opens that ) {
@@ -710,14 +710,14 @@ public int compareTo(Opens that) {
710
710
}
711
711
712
712
/**
713
- * Computes a hash code for this module opens .
713
+ * Computes a hash code for this module {@code Opens} .
714
714
*
715
715
* <p> The hash code is based upon the modifiers, the package name,
716
- * and for a qualified opens , the set of modules names to which the
716
+ * and for a qualified {@code Opens} , the set of modules names to which the
717
717
* package is opened. It satisfies the general contract of the
718
718
* {@link Object#hashCode Object.hashCode} method.
719
719
*
720
- * @return The hash-code value for this module opens
720
+ * @return The hash-code value for this module {@code Opens}
721
721
*/
722
722
@ Override
723
723
public int hashCode () {
@@ -727,7 +727,7 @@ public int hashCode() {
727
727
}
728
728
729
729
/**
730
- * Tests this module opens for equality with the given object.
730
+ * Tests this module {@code Opens} for equality with the given object.
731
731
*
732
732
* <p> If the given object is not an {@code Opens} then this method
733
733
* returns {@code false}. Two {@code Opens} objects are equal if their
@@ -810,7 +810,7 @@ private Provides(String service, List<String> providers, boolean unused) {
810
810
public List <String > providers () { return providers ; }
811
811
812
812
/**
813
- * Compares this provides to another.
813
+ * Compares this {@code Provides} to another.
814
814
*
815
815
* <p> Two {@code Provides} objects are compared by comparing the fully
816
816
* qualified class name of the service type lexicographically. Where the
@@ -824,8 +824,9 @@ private Provides(String service, List<String> providers, boolean unused) {
824
824
* @param that
825
825
* The {@code Provides} to compare
826
826
*
827
- * @return A negative integer, zero, or a positive integer if this provides
828
- * is less than, equal to, or greater than the given provides
827
+ * @return A negative integer, zero, or a positive integer if this
828
+ * {@code Provides} is less than, equal to, or greater than
829
+ * the given {@code Provides}
829
830
*/
830
831
public int compareTo (Provides that ) {
831
832
if (this == that ) return 0 ;
@@ -850,7 +851,7 @@ public int compareTo(Provides that) {
850
851
}
851
852
852
853
/**
853
- * Computes a hash code for this provides .
854
+ * Computes a hash code for this {@code Provides} .
854
855
*
855
856
* <p> The hash code is based upon the service type and the set of
856
857
* providers. It satisfies the general contract of the {@link
@@ -864,7 +865,7 @@ public int hashCode() {
864
865
}
865
866
866
867
/**
867
- * Tests this provides for equality with the given object.
868
+ * Tests this {@code Provides} for equality with the given object.
868
869
*
869
870
* <p> If the given object is not a {@code Provides} then this method
870
871
* returns {@code false}. Two {@code Provides} objects are equal if the
@@ -889,9 +890,9 @@ public boolean equals(Object ob) {
889
890
}
890
891
891
892
/**
892
- * Returns a string describing this provides .
893
+ * Returns a string describing this {@code Provides} .
893
894
*
894
- * @return A string describing this provides
895
+ * @return A string describing this {@code Provides}
895
896
*/
896
897
@ Override
897
898
public String toString () {
@@ -1416,7 +1417,7 @@ public Optional<Version> version() {
1416
1417
1417
1418
/**
1418
1419
* <p> Returns the string with the possibly-unparseable version of the
1419
- * module </p>
1420
+ * module. </p>
1420
1421
*
1421
1422
* @return The string containing the version of the module or an empty
1422
1423
* {@code Optional} if the module does not have a version
0 commit comments