Package org.osgi.resource
Interface Wire
-
- All Known Subinterfaces:
BundleWire
@ConsumerType public interface Wire
A wire connecting aCapabilityto aRequirement.Instances of this type must be effectively immutable. That is, for a given instance of this interface, the methods defined by this interface must always return the same result.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Compares thisWireto anotherWire.CapabilitygetCapability()Returns theCapabilityfor this wire.ResourcegetProvider()Returns the resource providing thecapability.RequirementgetRequirement()Returns theRequirementfor this wire.ResourcegetRequirer()Returns the resource whorequiresthecapability.inthashCode()Returns the hashCode of thisWire.
-
-
-
Method Detail
-
getCapability
Capability getCapability()
Returns theCapabilityfor this wire.- Returns:
- The
Capabilityfor this wire.
-
getRequirement
Requirement getRequirement()
Returns theRequirementfor this wire.- Returns:
- The
Requirementfor this wire.
-
getProvider
Resource getProvider()
Returns the resource providing thecapability.The returned resource may differ from the resource referenced by the
capability.- Returns:
- The resource providing the capability.
-
getRequirer
Resource getRequirer()
Returns the resource whorequiresthecapability.The returned resource may differ from the resource referenced by the
requirement.- Returns:
- The resource who requires the capability.
-
equals
boolean equals(java.lang.Object obj)
Compares thisWireto anotherWire.This
Wireis equal to anotherWireif they have the same capability, requirement, provider and requirer.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to compare against thisWire.- Returns:
trueif thisWireis equal to the other object;falseotherwise.
-
hashCode
int hashCode()
Returns the hashCode of thisWire.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hashCode of this
Wire.
-
-