1 package com.puppycrawl.tools.checkstyle.checks.indentation.indentation;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 @MyAnnotation1
18 public class
19 InputIndentationAnonymousClasses {
20 public InputIndentationAnonymousClasses(String longStr, String secondLongStr) {
21
22 }
23 public boolean foo() {
24 return false;
25 }
26
27 void foo2(StrangeInstance instance) {}
28 }
29
30 class WithAnonymousClass {
31 public static final Obj2 anon = new Obj2("Looooooooooooooooong",
32 "SecondLoooooooooooong") {
33 @Override public boolean foo() {
34 return false;
35 }
36 };
37
38 InputIndentationAnonymousClasses foo() {
39 return new InputIndentationAnonymousClasses(
40 "Loooooooooooooooong", "SecondLoooooooooong") {
41 @Override public boolean foo() {
42 Obj2 obj2Intance = new Obj2("", "");
43 obj2Intance.equals(new StrangeInstance(new Obj2("", "")) {
44 @Override void foo (String longString, String secondLongString) {}
45 });
46 return false;
47 }
48 };
49 }
50 }
51
52 class StrangeInstance {
53 public StrangeInstance(Object inputIndentationAnonymousClasses) {}
54 void foo (String longString, String secondLongString) {}
55 }
56
57 class Obj2 {
58 public Obj2(String value1, String value2) {}
59 boolean foo () { return true; }
60 }
61
62 @interface MyAnnotation1 {}