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());
}