org.eclipse.osgi.internal.resolver
Class BundleSpecificationImpl

java.lang.Object
  extended by org.eclipse.osgi.internal.resolver.BundleSpecificationImpl
All Implemented Interfaces:
java.lang.Cloneable, BundleSpecification, VersionConstraint

public class BundleSpecificationImpl
extends java.lang.Object
implements BundleSpecification


Field Summary
protected  java.lang.Object monitor
           
 
Constructor Summary
BundleSpecificationImpl()
           
 
Method Summary
 BundleDescription getBundle()
          Returns the bundle that declares this constraint.
 java.lang.String getName()
          Returns this constraint's name.
 BaseDescription getSupplier()
          Returns the supplier that satisfies this constraint, if it is resolved.
 VersionRange getVersionRange()
          Returns the version range for this constraint.
 boolean isExported()
          Returns whether or not this bundle specificiation is exported from the declaring bundle.
 boolean isOptional()
          Returns whether or not this bundle specificiation is optional.
 boolean isResolved()
          Returns whether this constraint is resolved.
 boolean isSatisfiedBy(BaseDescription supplier)
          Returns whether this constraint could be satisfied by the given supplier.
protected  void setBundle(BundleDescription bundle)
           
protected  void setExported(boolean exported)
           
protected  void setName(java.lang.String name)
           
protected  void setOptional(boolean optional)
           
protected  void setSupplier(BaseDescription supplier)
           
protected  void setVersionRange(VersionRange versionRange)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.osgi.service.resolver.VersionConstraint
getBundle, getName, getSupplier, getVersionRange, isResolved
 

Field Detail

monitor

protected final java.lang.Object monitor
Constructor Detail

BundleSpecificationImpl

public BundleSpecificationImpl()
Method Detail

setExported

protected void setExported(boolean exported)

setOptional

protected void setOptional(boolean optional)

isExported

public boolean isExported()
Description copied from interface: BundleSpecification
Returns whether or not this bundle specificiation is exported from the declaring bundle.

Specified by:
isExported in interface BundleSpecification
Returns:
whether this specification is exported

isOptional

public boolean isOptional()
Description copied from interface: BundleSpecification
Returns whether or not this bundle specificiation is optional.

Specified by:
isOptional in interface BundleSpecification
Returns:
whether this specification is optional

isSatisfiedBy

public boolean isSatisfiedBy(BaseDescription supplier)
Description copied from interface: VersionConstraint
Returns whether this constraint could be satisfied by the given supplier. This will depend on the suppliers different attributes including its name, versions and other arbitrary attributes

Specified by:
isSatisfiedBy in interface VersionConstraint
Parameters:
supplier - a supplier to be tested against this constraint (may be null)
Returns:
true if this constraint could be resolved using the supplier, false otherwise

toString

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

getName

public java.lang.String getName()
Description copied from interface: VersionConstraint
Returns this constraint's name.

Specified by:
getName in interface VersionConstraint
Returns:
this constraint's name

getVersionRange

public VersionRange getVersionRange()
Description copied from interface: VersionConstraint
Returns the version range for this constraint.

Specified by:
getVersionRange in interface VersionConstraint
Returns:
the version range for this constraint, or null

getBundle

public BundleDescription getBundle()
Description copied from interface: VersionConstraint
Returns the bundle that declares this constraint.

Specified by:
getBundle in interface VersionConstraint
Returns:
a bundle description

isResolved

public boolean isResolved()
Description copied from interface: VersionConstraint
Returns whether this constraint is resolved. A resolved constraint is guaranteed to have its supplier defined.

Specified by:
isResolved in interface VersionConstraint
Returns:
true if this bundle is resolved, false otherwise

getSupplier

public BaseDescription getSupplier()
Description copied from interface: VersionConstraint
Returns the supplier that satisfies this constraint, if it is resolved.

Specified by:
getSupplier in interface VersionConstraint
Returns:
a supplier, or null
See Also:
VersionConstraint.isResolved()

setName

protected void setName(java.lang.String name)

setVersionRange

protected void setVersionRange(VersionRange versionRange)

setBundle

protected void setBundle(BundleDescription bundle)

setSupplier

protected void setSupplier(BaseDescription supplier)


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.