org.jboss.deployment.scanner
Class PrefixDeploymentSorter
java.lang.Object
org.jboss.deployment.scanner.PrefixDeploymentSorter
- All Implemented Interfaces:
- java.util.Comparator, DefaultDeploymentSorter (src)
- public class PrefixDeploymentSorter
- extends java.lang.Object
- implements java.util.Comparator, DefaultDeploymentSorter (src)
This class is a comparator to sort deployment URLs based on the existence
of a numeric prefix. The name portion of the URL is evaluated for any
leading digits. If they exist, then they will define a numerical ordering
for this comparator. If there is no leading digits, then they will
compare as less than any name with leading digits. In the case of a
tie, the DeploymentSorter is consulted (@see org.jboss.deployment.DeploymentSorter).
Ex.these names are in ascending order:
test.sar, crap.ear, 001test.jar, 5test.rar, 5foo.jar, 120bar.jar
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
As described in @see java.util.Comparator. |
java.lang.String[] |
getSuffixOrder()
|
void |
setSuffixOrder(java.lang.String[] suffixOrder)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
PrefixDeploymentSorter
public PrefixDeploymentSorter()
getSuffixOrder
public java.lang.String[] getSuffixOrder()
- Specified by:
getSuffixOrder
in interface DefaultDeploymentSorter (src)
setSuffixOrder
public void setSuffixOrder(java.lang.String[] suffixOrder)
- Specified by:
setSuffixOrder
in interface DefaultDeploymentSorter (src)
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- As described in @see java.util.Comparator. This implements the
comparison technique described above.
- Specified by:
compare
in interface java.util.Comparator