1
2
3
4
5
6
7 package com.puppycrawl.tools.checkstyle.checks.coding.superclone;
8 public class InputSuperCloneInnerAndWithArguments
9 {
10 public InputSuperCloneInnerAndWithArguments() throws CloneNotSupportedException
11 {
12 super.equals(new String());
13 super.clone();
14 }
15
16 public Object clone() throws CloneNotSupportedException
17 {
18 return super.clone();
19 }
20
21 public void method() throws CloneNotSupportedException
22 {
23 super.clone();
24 }
25
26 {
27 super.clone();
28 }
29 }
30
31 class NoSuperClone
32 {
33 public Object clone()
34 {
35 return null;
36 }
37 }
38
39 class InnerClone
40 {
41 public Object clone()
42 {
43 class Inner
44 {
45 public Object clone() throws CloneNotSupportedException
46 {
47 return super.clone();
48 }
49 }
50 return null;
51 }
52 }
53
54
55
56 class CloneWithTypeArguments<T> extends CloneWithTypeArgumentsAndNoSuper<T>
57 {
58 public CloneWithTypeArguments<T> clone() throws CloneNotSupportedException
59 {
60 return (CloneWithTypeArguments<T>) super.<T>clone();
61 }
62 }
63
64 class CloneWithTypeArgumentsAndNoSuper<T>
65 {
66
67 public CloneWithTypeArgumentsAndNoSuper<T> clone()
68 throws CloneNotSupportedException
69 {
70 return null;
71 }
72 }
73
74
75 class MyClassWithGenericSuperMethod
76 {
77 void someMethod(java.util.List<? super java.util.Map<Object, Object>> l)
78 {
79
80 }
81
82
83
84
85
86
87 public static Object clone(Object o) {
88 return null;
89 }
90 }
91
92 class AnotherClass {
93
94
95
96
97
98
99
100 public <T> T clone(T t) {
101 return null;
102 }
103 }
104
105 class NativeTest {
106 public native Object clone();
107 }