1   package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Retention;
5   import java.lang.annotation.RetentionPolicy;
6   import java.lang.annotation.Target;
7   import java.nio.ByteBuffer;
8   
9   public class InputJavadocMethodReceiverParameter {
10  
11      @Retention(RetentionPolicy.RUNTIME)
12      @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
13      public @interface Ann {
14          /**
15           * A dummy annotation to check Java 8's receiver parameter handling.
16           *
17           * @return a class
18           */
19          Class<?> value() default Object.class;
20      }
21  
22      /**
23       * Function to check handling of Java 8's receiver parameter.
24       *
25       * @param buffer dummy argument
26       */
27      public void foo(@Ann(Object.class) InputJavadocMethodReceiverParameter this,
28              final ByteBuffer buffer) {
29          buffer.putInt(1);
30      }
31  
32  }