View Javadoc
1   /*
2   SuperClone
3   
4   
5   */
6   
7   package com.puppycrawl.tools.checkstyle.checks.coding.superclone;
8   
9   import java.util.ArrayList;
10  
11  /* Config = default */
12  public class InputSuperCloneMethodReference extends ArrayList {
13  
14      public interface CheckedSupplier<R, E extends Exception> {
15          R get() throws E;
16      }
17  
18      public Object clone() {
19          CheckedSupplier<Object, CloneNotSupportedException> r = super::clone;
20          CheckedSupplier<Object, CloneNotSupportedException> r1 = super::getClass;
21          try {
22              return r.get();
23          } catch (CloneNotSupportedException e) {
24              return null;
25          }
26      }
27  }