View Javadoc
1   /*
2   MissingJavadocMethod
3   minLineCount = (default)-1
4   allowedAnnotations = (default)Override
5   scope = private
6   excludeScope = (default)null
7   allowMissingPropertyJavadoc = (default)false
8   ignoreMethodNamesRegex = (default)null
9   tokens = (default)METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF
10  
11  
12  */
13  
14  package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadocmethod;
15  
16  import java.lang.annotation.ElementType;
17  import java.lang.annotation.Retention;
18  import java.lang.annotation.RetentionPolicy;
19  import java.lang.annotation.Target;
20  import java.nio.ByteBuffer;
21  
22  public class InputMissingJavadocMethodReceiverParameter { // ok
23  
24      @Retention(RetentionPolicy.RUNTIME)
25      @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
26      public @interface Ann {
27          /**
28           * A dummy annotation to check Java 8's receiver parameter handling.
29           *
30           * @return a class
31           */
32          Class<?> value() default Object.class;
33      }
34  
35      /**
36       * Function to check handling of Java 8's receiver parameter.
37       *
38       * @param buffer dummy argument
39       */
40      public void foo(@Ann(Object.class) InputMissingJavadocMethodReceiverParameter this,
41              final ByteBuffer buffer) {
42          buffer.putInt(1);
43      }
44  
45  }