View Javadoc
1   /*
2   JavadocMethod
3   validateThrows = true
4   
5   */
6   
7   package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
8   
9   // ok
10  interface Input {
11  
12      void setHeader(String header);
13  }
14  
15  public class InputJavadocMethod3 implements Input {
16  
17      /**
18       * Setter to define the required header specified inline.
19       * Individual header lines must be separated by the string {@code "\n"}
20       * (even on platforms with a different line separator).
21       * For header lines containing {@code "\n\n"} checkstyle will forcefully
22       * expect an empty line to exist. See examples below.
23       * Regular expressions must not span multiple lines.
24       *
25       * @param header the header value to validate and set (in that order)
26       */
27      @Override
28      public void setHeader(String header) {
29          if (!CommonUtil.isBlank(header)) {
30              if (!CommonUtil.isPatternValid(header)) {
31                  throw new IllegalArgumentException("Unable to parse format: " + header);
32              }
33          }
34      }
35  }
36  
37  class CommonUtil {
38  
39      public static boolean isBlank(String header) {
40          return false;
41      }
42  
43      public static boolean isPatternValid(String header) {
44          return false;
45      }
46  }