接口 Resource
-
- 所有已知子接口:
BundleRevision
- 所有已知实现类:
BundleRevisionImpl
@ConsumerType public interface ResourceA resource is the representation of a uniquely identified and typed data. A resource declares requirements that need to be satisfied by capabilities before it can provide its capabilities.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.
- 作者:
- $Id: c7b6462fb53b38ac3071d7ba73af9dad2af6b9ce $
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object obj)Compares thisResourceto anotherResource.java.util.List<Capability>getCapabilities(java.lang.String namespace)Returns the capabilities declared by this resource.java.util.List<Requirement>getRequirements(java.lang.String namespace)Returns the requirements declared by this bundle resource.inthashCode()Returns the hashCode of thisResource.
-
-
-
方法详细资料
-
getCapabilities
java.util.List<Capability> getCapabilities(java.lang.String namespace)
Returns the capabilities declared by this resource.- 参数:
namespace- The namespace of the declared capabilities to return ornullto return the declared capabilities from all namespaces.- 返回:
- An unmodifiable list containing the declared
Capabilitys from the specified namespace. The returned list will be empty if this resource declares no capabilities in the specified namespace.
-
getRequirements
java.util.List<Requirement> getRequirements(java.lang.String namespace)
Returns the requirements declared by this bundle resource.- 参数:
namespace- The namespace of the declared requirements to return ornullto return the declared requirements from all namespaces.- 返回:
- An unmodifiable list containing the declared
Requirements from the specified namespace. The returned list will be empty if this resource declares no requirements in the specified namespace.
-
equals
boolean equals(java.lang.Object obj)
Compares thisResourceto anotherResource.This
Resourceis equal to anotherResourceif both have the same content and come from the same location. Location may be defined as the bundle location if the resource is an installed bundle or the repository location if the resource is in a repository.- 覆盖:
equals在类中java.lang.Object- 参数:
obj- The object to compare against thisResource.- 返回:
trueif thisResourceis equal to the other object;falseotherwise.
-
hashCode
int hashCode()
Returns the hashCode of thisResource.- 覆盖:
hashCode在类中java.lang.Object- 返回:
- The hashCode of this
Resource.
-
-