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 class InputMagicNumberIgnoreNegativeOctalHex3 {
18
19 public int hashCode() {
20 return 31;
21 }
22
23
24 public int hashCode(int val) {
25 return 42;
26 }
27
28
29 public int hashcode() {
30 return 13;
31 }
32
33 static {
34 int x=21;
35 }
36
37 {
38 int y=37;
39 }
40
41 public InputMagicNumberIgnoreNegativeOctalHex3() {
42 int z=101;
43 }
44
45 @InputMagicNumberIntMethodAnnotation(42)
46 public void another() {
47 }
48
49 @InputMagicNumberIntMethodAnnotation(value=43)
50 public void another2() {
51 }
52
53 @InputMagicNumberIntMethodAnnotation(-44)
54 public void anotherNegative() {
55 }
56
57 @InputMagicNumberIntMethodAnnotation(value=-45)
58 public void anotherNegative2() {
59 }
60 }
61
62 class TestMethodCallIgnoreNegativeOctalHex3 {
63
64 public TestMethodCallIgnoreNegativeOctalHex3(int x){
65
66 }
67
68 public void method2() {
69 final TestMethodCallIgnoreNegativeOctalHex3 dummyObject =
70 new TestMethodCallIgnoreNegativeOctalHex3(62);
71 }
72 }
73
74 class BinaryIgnoreNegativeOctalHex3 {
75 int intValue = 0b101;
76 long l = 0b1010000101000101101000010100010110100001010001011010000101000101L;
77 }
78 @interface AnnotationWithDefaultValueIgnoreNegativeOctalHex3 {
79 int value() default 101;
80 int[] ar() default {102};
81 }
82 class AIgnoreNegativeOctalHex3 {
83 {
84 switch (Blah2IgnoreNegativeOctalHex1.LOW) {
85 default:
86 int b = 122;
87 }
88 }
89 }