Class ModuleDescriptor.Provides
- All Implemented Interfaces:
Comparable<ModuleDescriptor.Provides>
- Enclosing class:
ModuleDescriptor
A service that a module provides one or more implementations of.
- Since:
- 9
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintCompares thisProvidesto another.booleanTests thisProvidesfor equality with the given object.inthashCode()Computes a hash code for thisProvides.Returns the list of the binary names of the providers or provider factories.service()Returns the binary name of the service type.toString()Returns a string describing thisProvides.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Method Details
-
service
Returns the binary name of the service type.- Returns:
- the binary name of the service type
-
providers
Returns the list of the binary names of the providers or provider factories.- Returns:
- A non-empty and unmodifiable list of the binary names of the providers or provider factories
-
compareTo
Compares thisProvidesto another.Two
Providesobjects are compared by comparing the binary name of the service type lexicographically. Where the class names are equal then the list of the provider class names are compared by comparing the corresponding elements of both lists lexicographically and in sequence. Where the lists differ in size,Nis the size of the shorter list, and the firstNcorresponding elements are equal, then the longer list is considered to succeed the shorter list.- Specified by:
compareToin interfaceComparable<ModuleDescriptor.Provides>- Parameters:
that- TheProvidesto compare- Returns:
- A negative integer, zero, or a positive integer if this
Providesis less than, equal to, or greater than the givenProvides
-
hashCode
public int hashCode()Computes a hash code for thisProvides.The hash code is based upon the service type and the set of providers. It satisfies the general contract of the
Object.hashCodemethod. -
equals
Tests thisProvidesfor equality with the given object.If the given object is not a
Providesthen this method returnsfalse. TwoProvidesobjects are equal if the service type is equal and the list of providers is equal.This method satisfies the general contract of the
Object.equalsmethod. -
toString
-