Stuart McCulloch | 26e7a5a | 2011-10-17 10:31:43 +0000 | [diff] [blame] | 1 | package aQute.bnd.compatibility; |
| 2 | |
| 3 | |
| 4 | public class SignatureGenerator { |
| 5 | // enum ACCESS { |
| 6 | //// PUBLIC("+"), PROTECTED("|"), PACKAGE_PRIVATE(""), PRIVATE("-"); |
| 7 | //// final String repr; |
| 8 | //// |
| 9 | //// ACCESS(String s) { |
| 10 | //// repr = s; |
| 11 | //// } |
| 12 | //// |
| 13 | //// public String toString() { |
| 14 | //// return repr; |
| 15 | //// } |
| 16 | // } |
| 17 | // |
| 18 | // public static void main(String args[]) throws Exception { |
| 19 | // final PrintStream out = System.out; |
| 20 | // |
| 21 | // Clazz c = new Clazz("x", new FileResource(new File( |
| 22 | // "src/aQute/bnd/compatibility/SignatureGenerator.class"))); |
| 23 | // c.parseClassFileWithCollector(new ClassDataCollector() { |
| 24 | // public void classBegin(int access, String name) { |
| 25 | // out.print(name); |
| 26 | // out.println(access(access)); |
| 27 | // } |
| 28 | // |
| 29 | // private ACCESS access(int access) { |
| 30 | // if (Modifier.isPublic(access)) |
| 31 | // return ACCESS.PUBLIC; |
| 32 | // |
| 33 | // throw new IllegalArgumentException(); |
| 34 | // } |
| 35 | // |
| 36 | // public void extendsClass(String name) { |
| 37 | // } |
| 38 | // |
| 39 | // public void implementsInterfaces(String name[]) { |
| 40 | // } |
| 41 | // |
| 42 | // public void addReference(String token) { |
| 43 | // } |
| 44 | // |
| 45 | // public void annotation(Annotation annotation) { |
| 46 | // } |
| 47 | // |
| 48 | // public void parameter(int p) { |
| 49 | // } |
| 50 | // |
| 51 | // public void method(Clazz.MethodDef defined) { |
| 52 | // if (defined.isConstructor()) |
| 53 | // constructor(defined.access, defined.descriptor); |
| 54 | // else |
| 55 | // method(defined.access, defined.name, defined.descriptor); |
| 56 | // } |
| 57 | // |
| 58 | // public void field(Clazz.FieldDef defined) { |
| 59 | // field(defined.access, defined.name, defined.descriptor); |
| 60 | // } |
| 61 | // |
| 62 | // public void reference(Clazz.MethodDef referenced) { |
| 63 | // } |
| 64 | // |
| 65 | // public void reference(Clazz.FieldDef referenced) { |
| 66 | // } |
| 67 | // |
| 68 | // public void classEnd() { |
| 69 | // } |
| 70 | // |
| 71 | // @Deprecated// Will really be removed! |
| 72 | // public void field(int access, String name, String descriptor) { |
| 73 | // } |
| 74 | // |
| 75 | // @Deprecated// Will really be removed! |
| 76 | // public void constructor(int access, String descriptor) { |
| 77 | // } |
| 78 | // |
| 79 | // @Deprecated// Will really be removed! |
| 80 | // public void method(int access, String name, String descriptor) { |
| 81 | // } |
| 82 | // |
| 83 | // /** |
| 84 | // * The EnclosingMethod attribute |
| 85 | // * |
| 86 | // * @param cName |
| 87 | // * The name of the enclosing class, never null. Name is |
| 88 | // * with slashes. |
| 89 | // * @param mName |
| 90 | // * The name of the enclosing method in the class with |
| 91 | // * cName or null |
| 92 | // * @param mDescriptor |
| 93 | // * The descriptor of this type |
| 94 | // */ |
| 95 | // public void enclosingMethod(String cName, String mName, String mDescriptor) { |
| 96 | // |
| 97 | // } |
| 98 | // |
| 99 | // /** |
| 100 | // * The InnerClass attribute |
| 101 | // * |
| 102 | // * @param innerClass |
| 103 | // * The name of the inner class (with slashes). Can be |
| 104 | // * null. |
| 105 | // * @param outerClass |
| 106 | // * The name of the outer class (with slashes) Can be |
| 107 | // * null. |
| 108 | // * @param innerName |
| 109 | // * The name inside the outer class, can be null. |
| 110 | // * @param modifiers |
| 111 | // * The access flags |
| 112 | // */ |
| 113 | // public void innerClass(String innerClass, String outerClass, String innerName, |
| 114 | // int innerClassAccessFlags) { |
| 115 | // } |
| 116 | // |
| 117 | // public void signature(String signature) { |
| 118 | // } |
| 119 | // |
| 120 | // public void constant(Object object) { |
| 121 | // } |
| 122 | // |
| 123 | // }); |
| 124 | // } |
| 125 | } |