public interface Provider extends Nameable
Registrable
instances.
Uniqueness of a provider is determined by its qualified name.
Two Provider
instances with the same qualified name should
be implemented by the same class, provide the same functionality
and behave the same way.
All providers should fall back to their parent ask it to provide requested objects if they are themselves unable to provide these objects, with exception for the providers at the top of the provider hierarchy which have no parent.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this provider for equality.
|
int |
hashCode()
Returns the hash code value for this provider.
|
Provider |
parent()
Returns the provider's parent or
null if there is no parent. |
Provider parent()
null
if there is no parent.boolean equals(@Nullable java.lang.Object o)
true
if the specified object is also provider
and the two providers have the same name. This definition ensures
that this method works properly across different implementations
of the provider interface.equals
in class java.lang.Object
o
- an object to be compared for equality with this providertrue
if the specified object is equal to
this provider, false
otherwiseint hashCode()
hashCode
in class java.lang.Object