1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.puppycrawl.tools.checkstyle.checks.coding.magicnumber;
18
19
20 class InputMagicNumberIgnoreSome3 {
21
22 public int hashCode() {
23 return 31;
24 }
25
26
27 public int hashCode(int val) {
28 return 42;
29 }
30
31
32 public int hashcode() {
33 return 13;
34 }
35
36 static {
37 int x=21;
38 }
39
40 {
41 int y=37;
42 }
43
44 public InputMagicNumberIgnoreSome3() {
45 int z=101;
46 }
47
48 @InputMagicNumberIntMethodAnnotation(42)
49 public void another() {
50 }
51
52 @InputMagicNumberIntMethodAnnotation(value=43)
53 public void another2() {
54 }
55
56 @InputMagicNumberIntMethodAnnotation(-44)
57 public void anotherNegative() {
58 }
59
60 @InputMagicNumberIntMethodAnnotation(value=-45)
61 public void anotherNegative2() {
62 }
63 }
64
65 class TestMethodCallIgnoreSome3 {
66
67 public TestMethodCallIgnoreSome3(int x){
68
69 }
70
71 public void method2() {
72 final TestMethodCallIgnoreSome3 dummyObject = new TestMethodCallIgnoreSome3(62);
73 }
74 }
75
76 class BinarySome3 {
77 int intValue = 0b101;
78 long l = 0b1010000101000101101000010100010110100001010001011010000101000101L;
79 }
80 @interface AnnotationWithDefaultValueIgnoreSome3 {
81 int value() default 101;
82 int[] ar() default {102};
83 }
84 class ASome3 {
85 {
86 switch (Blah2IgnoreSome1.LOW) {
87 default:
88 int b = 122;
89 }
90 }
91 }