org.apache.felix.resolver.impl
Class HostedRequirement

java.lang.Object
  extended by org.apache.felix.resolver.impl.HostedRequirement
All Implemented Interfaces:
Requirement

public class HostedRequirement
extends java.lang.Object
implements Requirement


Constructor Summary
HostedRequirement(Resource host, Requirement req)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Returns the attributes of this requirement.
 java.util.Map<java.lang.String,java.lang.String> getDirectives()
          Returns the directives of this requirement.
 java.lang.String getNamespace()
          Returns the name space of this requirement.
 Requirement getOriginalRequirement()
           
 Resource getResource()
          Returns the resource declaring this requirement.
 int hashCode()
           
 boolean matches(Capability capability)
          Returns whether the specified capability matches this requirement.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HostedRequirement

public HostedRequirement(Resource host,
                         Requirement req)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getOriginalRequirement

public Requirement getOriginalRequirement()

getResource

public Resource getResource()
Description copied from interface: Requirement
Returns the resource declaring this requirement.

Specified by:
getResource in interface Requirement
Returns:
The resource declaring this requirement.

getNamespace

public java.lang.String getNamespace()
Description copied from interface: Requirement
Returns the name space of this requirement.

Specified by:
getNamespace in interface Requirement
Returns:
The name space of this requirement.

getDirectives

public java.util.Map<java.lang.String,java.lang.String> getDirectives()
Description copied from interface: Requirement
Returns the directives of this requirement.

Only the following list of directives have specified semantics:

All other directives have no specified semantics and are considered extra user defined information. The OSGi Alliance reserves the right to extend the set of directives which have specified semantics.

Specified by:
getDirectives in interface Requirement
Returns:
An unmodifiable map of directive names to directive values for this requirement, or an empty map if this requirement has no directives.

getAttributes

public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Description copied from interface: Requirement
Returns the attributes of this requirement.

Requirement attributes have no specified semantics and are considered extra user defined information.

Specified by:
getAttributes in interface Requirement
Returns:
An unmodifiable map of attribute names to attribute values for this requirement, or an empty map if this requirement has no attributes.

matches

public boolean matches(Capability capability)
Description copied from interface: Requirement
Returns whether the specified capability matches this requirement.

A capability matches this requirement when all of the following are true:

Specified by:
matches in interface Requirement
Parameters:
capability - The capability to match to this requirement.
Returns:
true if the specified capability matches this this requirement; false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.