public class GenericSpecificationImpl extends Object implements GenericSpecification
| Modifier and Type | Field and Description |
|---|---|
protected Object |
monitor |
static int |
RESOLUTION_FROM_BREE |
RESOLUTION_MULTIPLE, RESOLUTION_OPTIONAL| Constructor and Description |
|---|
GenericSpecificationImpl() |
| Modifier and Type | Method and Description |
|---|---|
BundleDescription |
getBundle()
Returns the bundle that declares this constraint.
|
protected Map<String,Object> |
getInteralAttributes() |
protected Map<String,String> |
getInternalDirectives() |
protected String |
getInternalNameSpace() |
String |
getMatchingFilter()
Returns a matching filter used to match with a suppliers attributes
|
String |
getName()
Returns this constraint's name.
|
BundleRequirement |
getRequirement()
Returns the requirement represented by this constraint.
|
int |
getResolution()
Returns the resolution type of the required capability.
|
BaseDescription |
getSupplier()
Returns the supplier that satisfies this constraint, if it is resolved.
|
GenericDescription[] |
getSuppliers()
Returns the suppliers of the capability.
|
String |
getType()
Returns the type of generic specification
|
Object |
getUserObject()
Returns the user object associated to this constraint, or
null if none exists. |
VersionRange |
getVersionRange()
Returns the version range for this constraint.
|
protected boolean |
hasMandatoryAttributes(String[] mandatory) |
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 |
setName(String name) |
protected void |
setSupplier(BaseDescription supplier) |
void |
setUserObject(Object userObject)
Associates a user-provided object to this constraint, or
removes an existing association, if
null is provided. |
protected void |
setVersionRange(VersionRange versionRange) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBundle, getName, getRequirement, getUserObject, getVersionRange, setUserObjectpublic static final int RESOLUTION_FROM_BREE
protected final Object monitor
public String getMatchingFilter()
GenericSpecificationgetMatchingFilter in interface GenericSpecificationpublic boolean isSatisfiedBy(BaseDescription supplier)
VersionConstraintisSatisfiedBy in interface VersionConstraintsupplier - a supplier to be tested against this constraint (may be
null)true if this constraint could be resolved using the supplier,
false otherwiseprotected boolean hasMandatoryAttributes(String[] mandatory)
public String getType()
GenericSpecificationgetType in interface GenericSpecificationpublic int getResolution()
GenericSpecificationGenericSpecification.RESOLUTION_OPTIONAL
and/or the multiple bit GenericSpecification.RESOLUTION_MULTIPLE set.getResolution in interface GenericSpecificationpublic boolean isResolved()
VersionConstraintisResolved in interface VersionConstrainttrue if this bundle is resolved, false
otherwisepublic BaseDescription getSupplier()
VersionConstraintgetSupplier in interface VersionConstraintnullVersionConstraint.isResolved()protected void setSupplier(BaseDescription supplier)
public GenericDescription[] getSuppliers()
GenericSpecificationgetSuppliers in interface GenericSpecificationprotected String getInternalNameSpace()
public String getName()
VersionConstraintgetName in interface VersionConstraintpublic VersionRange getVersionRange()
VersionConstraintgetVersionRange in interface VersionConstraintnullpublic BundleDescription getBundle()
VersionConstraintgetBundle in interface VersionConstraintprotected void setName(String name)
protected void setVersionRange(VersionRange versionRange)
protected void setBundle(BundleDescription bundle)
public BundleRequirement getRequirement()
VersionConstraintnull is
returned.getRequirement in interface VersionConstraintpublic Object getUserObject()
VersionConstraintnull if none exists.getUserObject in interface VersionConstraintnullpublic void setUserObject(Object userObject)
VersionConstraintnull is provided. The
provided object is not interpreted in any ways by this
constrain.setUserObject in interface VersionConstraintuserObject - an arbitrary object provided by the user, or
nullCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.