1 package com.puppycrawl.tools.checkstyle; 6 7 11 public abstract class InputDesignForExtension 12 { 13 15 public interface InterfaceOK 16 { 17 void implicitlyAbstract(); 18 } 19 20 final class ClassOK 21 { 22 protected void finalThroughClassDef() 23 { 24 System.out.println("no way to override"); 25 } 26 } 27 28 protected void nonFinalButEmpty() 29 { 30 } 31 32 public void nonFinalButEmpty2() 33 { 34 } 36 37 private void aPrivateMethod() 38 { 39 System.out.println("no way to override"); 40 } 41 42 protected abstract void nonFinalButAbstract(); 43 44 46 protected void doh() 47 { 48 System.out.println("nonempty and overriding possible"); 49 } 50 51 public native void aNativeMethod(); 55 56 private class MyComparator implements java.util.Comparator 60 { 61 public int compare(Object o1, Object o2) 62 { 63 if (o1.hashCode() > o2.hashCode()) { 65 return -1; 66 } 67 else { 68 return 1; 69 } 70 } 71 } 72 } 73 74 enum TEnum 76 { 77 FIRST, 78 SECOND; 79 80 public int value() 81 { 82 return 3; 83 } 84 } 85 | Popular Tags |