1 19 20 25 26 package org.netbeans.test.java.generating.SuperClassInterfaces; 27 28 import com.sun.source.tree.ClassTree; 29 import com.sun.source.tree.Tree; 30 import org.netbeans.test.java.Common; 31 import java.lang.reflect.Modifier ; 32 import java.util.ArrayList ; 33 import java.util.Collections ; 34 import java.util.List ; 35 import org.netbeans.api.java.source.CancellableTask; 36 import org.netbeans.api.java.source.JavaSource; 37 import org.netbeans.api.java.source.JavaSource.Phase; 38 import org.netbeans.api.java.source.WorkingCopy; 39 import org.openide.loaders.*; 40 import org.netbeans.junit.*; 41 import org.openide.filesystems.FileObject; 42 43 67 68 69 public class SuperClassInterfaces extends org.netbeans.test.java.XRunner { 70 71 public static void main(java.lang.String [] args) { 72 junit.textui.TestRunner.run(suite()); 73 } 74 75 public SuperClassInterfaces() { 76 super(""); 77 } 78 79 public SuperClassInterfaces(java.lang.String testName) { 80 super(testName); 81 } 82 83 public static NbTest suite() { 84 return new NbTestSuite(SuperClassInterfaces.class); 85 } 86 87 94 95 public boolean go(Object o, java.io.PrintWriter log) throws Exception { 96 97 FileObject fo = (FileObject) o; 98 JavaSource js = JavaSource.forFileObject(fo); 99 List <String > list = new ArrayList <String >(); 100 list.add("java.util.List"); 101 list.add("java.io.Closeable"); 102 Common.addExtendImplementClause(js, "java.io.File", list); 103 return true; 104 } 105 106 108 protected void setUp() { 109 super.setUp(); 110 name = "JavaTestSourceInnerInterfaces"; 111 packageName = "org.netbeans.test.java.testsources"; 112 } 113 114 } 115 | Popular Tags |