Class ModuleDescriptor.Exports
- All Implemented Interfaces:
Comparable<ModuleDescriptor.Exports>
- Enclosing class:
ModuleDescriptor
A package exported by a module, may be qualified or unqualified.
- Since:
- 9
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA modifier on an exported package. -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of the module export flags for this module descriptor.intCompares this module export to another.booleanTests this module export for equality with the given object.inthashCode()Computes a hash code for this module export.booleanReturnstrueif this is a qualified export.Returns the set of modifiers.source()Returns the package name.targets()For a qualified export, returns the non-empty and immutable set of the module names to which the package is exported.toString()Returns a string describing the exported package.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Method Details
-
modifiers
Returns the set of modifiers.- Returns:
- A possibly-empty unmodifiable set of modifiers
-
accessFlags
Returns the set of the module export flags for this module descriptor.- Returns:
- A possibly-empty unmodifiable set of export flags
- See Java Virtual Machine Specification:
-
4.7.25 The Module Attribute
- Since:
- 20
- See Also:
-
isQualified
public boolean isQualified()Returnstrueif this is a qualified export.- Returns:
trueif this is a qualified export
-
source
-
targets
-
compareTo
Compares this module export to another.Two
Exportsobjects are compared by comparing the package names lexicographically. Where the packages names are equal then the sets of modifiers are compared in the same way that module modifiers are compared (seeModuleDescriptor.compareTo). Where the package names are equal and the set of modifiers are equal then the set of target modules are compared. This is done by sorting the names of the target modules in ascending order, and according to their natural ordering, and then comparing the corresponding elements lexicographically. Where the sets differ in size, and the larger set contains all elements of the smaller set, then the larger set is considered to succeed the smaller set.- Specified by:
compareToin interfaceComparable<ModuleDescriptor.Exports>- Parameters:
that- The module export to compare- Returns:
- A negative integer, zero, or a positive integer if this module export is less than, equal to, or greater than the given export dependence
-
hashCode
public int hashCode()Computes a hash code for this module export.The hash code is based upon the modifiers, the package name, and for a qualified export, the set of modules names to which the package is exported. It satisfies the general contract of the
Object.hashCodemethod. -
equals
Tests this module export for equality with the given object.If the given object is not an
Exportsthen this method returnsfalse. Two module exports objects are equal if their set of modifiers is equal, the package names are equal and the set of target module names is equal.This method satisfies the general contract of the
Object.equalsmethod. -
toString
-