public class NativeCodeSpecificationImpl extends Object implements NativeCodeSpecification
Constructor and Description |
---|
NativeCodeSpecificationImpl() |
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 |
getName()
Returns this constraint's name.
|
NativeCodeDescription[] |
getPossibleSuppliers()
Returns the list of possible suppliers to this native code specification.
|
BundleRequirement |
getRequirement()
Returns the requirement represented by this constraint.
|
BaseDescription |
getSupplier()
Returns the supplier that satisfies this constraint, if it is resolved.
|
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 |
isOptional()
Returns whether or not this native code specification 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 |
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, wait
getBundle, getName, getRequirement, getSupplier, getUserObject, getVersionRange, isResolved, setUserObject
protected final Object monitor
public NativeCodeDescription[] getPossibleSuppliers()
NativeCodeSpecification
VersionConstraint.getSupplier()
.getPossibleSuppliers
in interface NativeCodeSpecification
public boolean isOptional()
NativeCodeSpecification
isOptional
in interface NativeCodeSpecification
public boolean isSatisfiedBy(BaseDescription supplier)
VersionConstraint
isSatisfiedBy
in interface VersionConstraint
supplier
- 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)
protected String getInternalNameSpace()
public String getName()
VersionConstraint
getName
in interface VersionConstraint
public VersionRange getVersionRange()
VersionConstraint
getVersionRange
in interface VersionConstraint
null
public BundleDescription getBundle()
VersionConstraint
getBundle
in interface VersionConstraint
public boolean isResolved()
VersionConstraint
isResolved
in interface VersionConstraint
true
if this bundle is resolved, false
otherwisepublic BaseDescription getSupplier()
VersionConstraint
getSupplier
in interface VersionConstraint
null
VersionConstraint.isResolved()
protected void setName(String name)
protected void setVersionRange(VersionRange versionRange)
protected void setBundle(BundleDescription bundle)
protected void setSupplier(BaseDescription supplier)
public BundleRequirement getRequirement()
VersionConstraint
null
is
returned.getRequirement
in interface VersionConstraint
public Object getUserObject()
VersionConstraint
null
if none exists.getUserObject
in interface VersionConstraint
null
public void setUserObject(Object userObject)
VersionConstraint
null
is provided. The
provided object is not interpreted in any ways by this
constrain.setUserObject
in interface VersionConstraint
userObject
- an arbitrary object provided by the user, or
null
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.