Search in sources :

Example 1 with Priority

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;
}
Also used : Extension(hudson.Extension) Priority(org.hudsonci.inject.Priority)

Aggregations

Extension (hudson.Extension)1 Priority (org.hudsonci.inject.Priority)1