use of org.hudsonci.inject.Priority in project hudson-2.x by hudson.
the class SmoothieComponent method priorityOf.
public static Double priorityOf(final Class<?> type) {
if (type != null) {
Extension extension = type.getAnnotation(Extension.class);
if (extension != null) {
return Double.valueOf(extension.ordinal());
}
ExtensionQualifier qualifier = type.getAnnotation(ExtensionQualifier.class);
if (qualifier != null) {
return Double.valueOf(qualifier.extension().ordinal());
}
Priority priority = type.getAnnotation(Priority.class);
if (priority != null) {
return Double.valueOf(priority.value());
}
}
return null;
}