|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.classloading.spi.helpers.NameAndVersionRangeSupport
org.jboss.classloading.spi.metadata.helpers.AbstractRequirement
public class AbstractRequirement
AbstractRequirement.
Constructor Summary | |
---|---|
AbstractRequirement()
Create a new AbstractRequirement |
|
AbstractRequirement(String name)
Create a new AbstractRequirement |
|
AbstractRequirement(String name,
VersionRange versionRange)
Create a new AbstractRequirement. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
boolean |
isConsistent(Requirement other)
Check whether this requirement is consistent with another requirement. |
protected boolean |
isConsistent(Requirement other,
Class<? extends AbstractRequirement> requirementType)
Check whether the requirements are consistent |
boolean |
isDynamic()
Whether the requirement is dynamic |
boolean |
isOptional()
Whether the requirement is optional |
boolean |
isReExport()
Whether to re-export the requirement |
void |
setDynamic(boolean dynamic)
Set the dynamic. |
void |
setOptional(boolean optional)
Set the optional. |
void |
setReExport(boolean reExport)
Set the reExport. |
String |
toString()
|
protected void |
toString(StringBuffer buffer)
For subclasses to override toString() |
boolean |
wantReExports()
Whether we want re-exports |
Methods inherited from class org.jboss.classloading.spi.helpers.NameAndVersionRangeSupport |
---|
getFrom, getFromVersion, getName, getTo, getToVersion, getVersionRange, hashCode, isFromVersionInclusive, isToVersionInclusive, setFrom, setFromVersion, setFromVersionInclusive, setName, setTo, setToVersion, setToVersionInclusive, setVersion, setVersionRange |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractRequirement()
public AbstractRequirement(String name)
name
- the name
IllegalArgumentException
- for a null namepublic AbstractRequirement(String name, VersionRange versionRange)
name
- the nameversionRange
- the version range - pass null for all versions
IllegalArgumentException
- for a null nameMethod Detail |
---|
public boolean isOptional()
Requirement
isOptional
in interface Requirement
public void setOptional(boolean optional)
optional
- the optional.public boolean isDynamic()
Requirement
isDynamic
in interface Requirement
public void setDynamic(boolean dynamic)
dynamic
- the dynamic.public boolean wantReExports()
Requirement
wantReExports
in interface Requirement
public boolean isReExport()
Requirement
isReExport
in interface Requirement
public void setReExport(boolean reExport)
reExport
- the reExport.public boolean isConsistent(Requirement other)
Requirement
Typically they will be inconsistent if they are the same type, have the same name but a different version
isConsistent
in interface Requirement
other
- the other requirement
protected boolean isConsistent(Requirement other, Class<? extends AbstractRequirement> requirementType)
other
- the other requirementrequirementType
- the class to check when looking for inconsistencies (uses getClass() when null)
public boolean equals(Object obj)
equals
in class NameAndVersionRangeSupport
public String toString()
toString
in class NameAndVersionRangeSupport
protected void toString(StringBuffer buffer)
buffer
- the buffer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |