code: public Method getRestrictAtViewMethod(Annotation annotation) {
          Method restrictAtViewMethod;
          try {
              restrictAtViewMethod = annotation.annotationType().getDeclaredMethod("restrictAtPhase");
          } catch (NoSuchMethodException ex) {
              restrictAtViewMethod = null;
          } catch (SecurityException ex) {
              throw new IllegalArgumentException("restrictAtView method must be accessible", ex);
          }
          return restrictAtViewMethod;
      }
docs: Utility method to extract the "restrictAtPhase" method from an annotation
  
  @param annotation
  @return restrictAtViewMethod if found, null otherwise