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