edu.mssm.crover.util
Class Inspect

java.lang.Object
  |
  +--edu.mssm.crover.util.Inspect

public class Inspect
extends java.lang.Object

Inspect a class with the reflection API. This class contains a the useful hasInterface(java.lang.Object, java.lang.Class) method.


Constructor Summary
Inspect()
           
 
Method Summary
static boolean hasInterface(java.lang.Class child, java.lang.Class parent)
          Returns whether the class child supports the interface described by parent.
static boolean hasInterface(java.lang.Object a, java.lang.Class c)
          Returns whether the instance a supports the interface described by c.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inspect

public Inspect()
Method Detail

hasInterface

public static boolean hasInterface(java.lang.Object a,
                                   java.lang.Class c)
Returns whether the instance a supports the interface described by c.

Returns:
True if a supports c, False otherwise.

hasInterface

public static boolean hasInterface(java.lang.Class child,
                                   java.lang.Class parent)
Returns whether the class child supports the interface described by parent.

Returns:
True if object_class supports c, False otherwise.


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.