edu.mit.ai.psg.jeva
Class WrappedClass

java.lang.Object
  |
  +--edu.mit.ai.psg.jeva.WrappedClass

public class WrappedClass
extends Object
implements IClass

WrappedClass wraps binary Class objects to implement IClass . Invariant: if classA == classB, their wrappers are == also.

Author:
CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998, 1999 Massachusetts Institute of Technology

Method Summary
 boolean equals(Object obj)
           
 IClass[] getClasses()
           
 ClassLoader getClassLoader()
           
 IClass getComponentType()
           
 IConstructor getConstructor(IClass[] parameterTypes)
           
 IConstructor[] getConstructors()
           
 IClass[] getDeclaredClasses()
           
 IConstructor getDeclaredConstructor(IClass[] parameterTypes)
           
 IConstructor[] getDeclaredConstructors()
           
 IField getDeclaredField(String name)
           
 IField[] getDeclaredFields()
           
 IMethod getDeclaredMethod(String name, IClass[] parameterTypes)
           
 IMethod[] getDeclaredMethods()
           
 IClass getDeclaringClass()
           
 IField getField(String name)
           
 IField[] getFields()
           
 IClass[] getInterfaces()
           
 IMethod getMethod(String name, IClass[] parameterTypes)
           
 IMethod[] getMethods()
           
 int getModifiers()
           
 String getName()
           
 URL getResource(String name)
           
 InputStream getResourceAsStream(String name)
           
 Object[] getSigners()
           
 IClass getSuperclass()
           
 boolean isArray()
           
 boolean isAssignableFrom(IClass from)
           
 boolean isInstance(Object obj)
           
 boolean isInterface()
           
 boolean isPrimitive()
           
 Object newInstance()
           
 String toString()
           
 Class unwrapClass()
           
static Class unwrapClass(IClass wrappedClass)
           
static Class[] unwrapClasses(IClass[] wrappedClasses)
           
static Class unwrapPrimitiveClass(IClass wrappedPrimitiveIClass)
           
static IClass wrapClass(Class aClass)
           
static IClass[] wrapClasses(Class[] classes)
           
static IClass wrapImplementationClass(Class aClass)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

wrapClass

public static IClass wrapClass(Class aClass)

wrapImplementationClass

public static IClass wrapImplementationClass(Class aClass)

wrapClasses

public static IClass[] wrapClasses(Class[] classes)

unwrapClass

public static Class unwrapClass(IClass wrappedClass)
                         throws IllegalArgumentException

unwrapPrimitiveClass

public static Class unwrapPrimitiveClass(IClass wrappedPrimitiveIClass)

unwrapClasses

public static Class[] unwrapClasses(IClass[] wrappedClasses)
                             throws IllegalArgumentException

unwrapClass

public Class unwrapClass()

newInstance

public Object newInstance()
                   throws InstantiationException,
                          IllegalAccessException
Specified by:
newInstance in interface IClass

isInstance

public boolean isInstance(Object obj)
Specified by:
isInstance in interface IClass

isAssignableFrom

public boolean isAssignableFrom(IClass from)
Specified by:
isAssignableFrom in interface IClass

isInterface

public boolean isInterface()
Specified by:
isInterface in interface IClass

isArray

public boolean isArray()
Specified by:
isArray in interface IClass

isPrimitive

public boolean isPrimitive()
Specified by:
isPrimitive in interface IClass

getName

public String getName()
Specified by:
getName in interface IClass

getClassLoader

public ClassLoader getClassLoader()
Specified by:
getClassLoader in interface IClass

getSuperclass

public IClass getSuperclass()
Specified by:
getSuperclass in interface IClass

getInterfaces

public IClass[] getInterfaces()
Specified by:
getInterfaces in interface IClass

getComponentType

public IClass getComponentType()
Specified by:
getComponentType in interface IClass

getModifiers

public int getModifiers()

getSigners

public Object[] getSigners()
Specified by:
getSigners in interface IClass

getDeclaringClass

public IClass getDeclaringClass()

getClasses

public IClass[] getClasses()
Specified by:
getClasses in interface IClass

getFields

public IField[] getFields()
                   throws SecurityException
Specified by:
getFields in interface IClass

getMethods

public IMethod[] getMethods()
                     throws SecurityException
Specified by:
getMethods in interface IClass

getConstructors

public IConstructor[] getConstructors()
                               throws SecurityException
Specified by:
getConstructors in interface IClass

getField

public IField getField(String name)
                throws NoSuchFieldException,
                       SecurityException
Specified by:
getField in interface IClass

getMethod

public IMethod getMethod(String name,
                         IClass[] parameterTypes)
                  throws NoSuchMethodException,
                         SecurityException
Specified by:
getMethod in interface IClass

getConstructor

public IConstructor getConstructor(IClass[] parameterTypes)
                            throws NoSuchMethodException,
                                   SecurityException
Specified by:
getConstructor in interface IClass

getDeclaredClasses

public IClass[] getDeclaredClasses()
                            throws SecurityException
Specified by:
getDeclaredClasses in interface IClass

getDeclaredFields

public IField[] getDeclaredFields()
                           throws SecurityException
Specified by:
getDeclaredFields in interface IClass

getDeclaredMethods

public IMethod[] getDeclaredMethods()
                             throws SecurityException
Specified by:
getDeclaredMethods in interface IClass

getDeclaredConstructors

public IConstructor[] getDeclaredConstructors()
                                       throws SecurityException
Specified by:
getDeclaredConstructors in interface IClass

getDeclaredField

public IField getDeclaredField(String name)
                        throws NoSuchFieldException,
                               SecurityException
Specified by:
getDeclaredField in interface IClass

getDeclaredMethod

public IMethod getDeclaredMethod(String name,
                                 IClass[] parameterTypes)
                          throws NoSuchMethodException,
                                 SecurityException
Specified by:
getDeclaredMethod in interface IClass

getDeclaredConstructor

public IConstructor getDeclaredConstructor(IClass[] parameterTypes)
                                    throws NoSuchMethodException,
                                           SecurityException
Specified by:
getDeclaredConstructor in interface IClass

getResourceAsStream

public InputStream getResourceAsStream(String name)
Specified by:
getResourceAsStream in interface IClass

getResource

public URL getResource(String name)
Specified by:
getResource in interface IClass

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-bugs@ai.mit.edu