com.thoughtworks.proxy.toys.multicast
Class ClassHierarchyIntrospector

java.lang.Object
  extended by com.thoughtworks.proxy.toys.multicast.ClassHierarchyIntrospector

Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.

public class ClassHierarchyIntrospector
extends Object

Helper class for introspecting interface and class hierarchies.

Since:
0.1
Author:
Aslak Hellesøy, Jörg Schaible

Field Summary
static Method equals
          Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
static Method hashCode
          Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
 
Method Summary
static Class[] addIfClassProxyingSupportedAndNotObject(Class clazz, Class[] interfaces, ProxyFactory proxyFactory)
          Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
static Class[] getAllInterfaces(Class clazz)
          Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
static Class[] getAllInterfaces(Object[] objects)
          Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
static Class getMostCommonSuperclass(Object[] objects)
          Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

equals

public static Method equals
Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
the Object.equals(Object) method.


hashCode

public static Method hashCode
Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.
the Object.hashCode() method.

Method Detail

getAllInterfaces

public static Class[] getAllInterfaces(Object[] objects)
Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.

Get all the interfaces implemented by a list of objects.

Parameters:
objects - the list of objects to consider.
Returns:
an array of interfaces.

getAllInterfaces

public static Class[] getAllInterfaces(Class clazz)
Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.

Get all interfaces of the given type. If the type is a class, the returned list contains any interface, that is implemented by the class. If the type is an interface, the all superinterfaces and the interface itself are included.

Parameters:
clazz - type to explore.
Returns:
an array with all interfaces. The array may be empty.

getMostCommonSuperclass

public static Class getMostCommonSuperclass(Object[] objects)
Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.

Get most common superclass for all given objects.

Parameters:
objects - the array of objects to consider.
Returns:
the superclass or Void.class for an empty array.

addIfClassProxyingSupportedAndNotObject

public static Class[] addIfClassProxyingSupportedAndNotObject(Class clazz,
                                                              Class[] interfaces,
                                                              ProxyFactory proxyFactory)
Deprecated. since 0.2, use com.thoughtworks.proxy.kit.ReflectionUitls.

Add the given type to the given interfaces, if the given ProxyFactory supports proxy generation for this type.

Parameters:
clazz - the class type (Object.class will be ignored)
interfaces - the array of interfaces
proxyFactory - the ProxyFactory in use
Returns:
the new array of interfaces including the class type (if can be proxied)