public class AbstractRequirement extends Object implements Requirement
Requirement.| Constructor and Description |
|---|
AbstractRequirement(AbstractResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
adapt(Class<T> type)
Adapt the this type to the given type
|
Object |
getAttribute(String key)
Get the value of the given attribute
|
Map<String,Object> |
getAttributes()
Returns the attributes of this requirement.
|
String |
getDirective(String key)
Get the value of the given directive
|
Map<String,String> |
getDirectives()
Returns the directives of this requirement.
|
String |
getNamespace()
Returns the namespace of this requirement.
|
Resource |
getResource()
Returns the resource declaring this requirement.
|
static VersionRange |
getVersionRange(Requirement req,
String attr) |
boolean |
isOptional()
A flag indicating that this is an optional requirement.
|
String |
toString() |
protected void |
validate() |
public <T> T adapt(Class<T> type)
Adaptablepublic Resource getResource()
RequirementgetResource in interface Requirementnull
if this requirement is synthesized.public String getNamespace()
RequirementgetNamespace in interface Requirementpublic boolean isOptional()
RequirementisOptional in interface Requirementpublic Map<String,String> getDirectives()
RequirementgetDirectives in interface Requirementpublic String getDirective(String key)
RequirementgetDirective in interface Requirementpublic Map<String,Object> getAttributes()
RequirementRequirement attributes have no specified semantics and are considered extra user defined information.
getAttributes in interface Requirementpublic Object getAttribute(String key)
RequirementgetAttribute in interface Requirementpublic static VersionRange getVersionRange(Requirement req, String attr)
protected void validate()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.