FileDocCategorySizeDatePackage
JavaClass.javaAPI DocApache Axis 1.42119Sat Apr 22 18:57:28 BST 2006org.apache.axis.utils.cache

JavaClass

public class JavaClass extends Object implements Serializable
A simple cache of previously loaded classes, and their methods.
author
Sam Ruby

Fields Summary
private static Hashtable
classes
private Hashtable
methods
private Class
jc
Constructors Summary
public JavaClass(Class jc)
Create a cache entry for this java.lang.Class

        this.jc = jc;
        classes.put(jc, this);
    
Methods Summary
public static synchronized org.apache.axis.utils.cache.JavaClassfind(java.lang.Class jc)
Find (or create if necessary) a JavaClass associated with a given class


                     
          
        JavaClass result = (JavaClass) classes.get(jc);

        if (result == null) {
            result = new JavaClass(jc);
            classes.put(jc, result);
        }

        return result;
    
public java.lang.ClassgetJavaClass()
Return the java.lang.Class associated with this entry

        return jc;
    
public java.lang.reflect.Method[]getMethod(java.lang.String name)
Lookup a method based on name. This method returns an array just in case there is more than one.

param
name name of method

        JavaMethod jm = (JavaMethod) methods.get(name);

        if (jm == null) {
            methods.put(name, jm=new JavaMethod(jc, name));
        }

        return jm.getMethod();