code: @SuppressWarnings({ "rawtypes", "unchecked" })
      public static int getPriority(Class type) {
          int prio = 1;
  		Priority priority = (Priority)type.getAnnotation(Priority.class);
          if (priority != null) {
              prio = priority.value();
          }
          return prio;
      }
docs: Checks the given type optionally annotated with a @Priority. If present the annotation's value is evaluated.
  If no such annotation is present, a default priority {@code 1} is returned.
  
  @param type the type, not {@code null}.
  @return a priority, by default 1.