1 55 56 package org.jboss.axis.utils.cache; 57 58 import java.lang.reflect.Method ; 59 import java.util.Hashtable ; 60 61 66 public class JavaClass 67 { 68 69 private static Hashtable classes = new Hashtable (); 70 private Hashtable methods = new Hashtable (); 71 72 private Class jc; 73 74 78 public static synchronized JavaClass find(Class jc) 79 { 80 JavaClass result = (JavaClass)classes.get(jc); 81 82 if (result == null) 83 { 84 result = new JavaClass(jc); 85 classes.put(jc, result); 86 } 87 88 return result; 89 } 90 91 94 public JavaClass(Class jc) 95 { 96 this.jc = jc; 97 classes.put(jc, this); 98 } 99 100 103 public Class getJavaClass() 104 { 105 return jc; 106 } 107 108 114 public Method [] getMethod(String name) 115 { 116 JavaMethod jm = (JavaMethod)methods.get(name); 117 118 if (jm == null) 119 { 120 methods.put(name, jm = new JavaMethod(jc, name)); 121 } 122 123 return jm.getMethod(); 124 } 125 } 126 127 ; 128 | Popular Tags |