org.progeeks.util
Class InspectionUtils

java.lang.Object
  extended by org.progeeks.util.InspectionUtils

public class InspectionUtils
extends java.lang.Object

Utility methods for reflective operations.

Version:
$Revision: 1.1 $
Author:
Paul Speed

Constructor Summary
InspectionUtils()
           
 
Method Summary
static boolean areTypesCompatible(java.lang.Class[] targets, java.lang.Class[] sources)
          Returns true if all classes in the sources list are assignment compatible with the targets list.
static java.lang.Class translateFromPrimitive(java.lang.Class primitive)
          If this specified class represents a primitive type (int, float, etc.) then it is translated into its wrapper type (Integer, Float, etc.).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InspectionUtils

public InspectionUtils()
Method Detail

areTypesCompatible

public static boolean areTypesCompatible(java.lang.Class[] targets,
                                         java.lang.Class[] sources)
Returns true if all classes in the sources list are assignment compatible with the targets list. In other words, if all targets[n].isAssignableFrom( sources[n] ) then this method returns true. Any null values in sources are considered wild-cards and will skip the isAssignableFrom check as if it passed.


translateFromPrimitive

public static java.lang.Class translateFromPrimitive(java.lang.Class primitive)
If this specified class represents a primitive type (int, float, etc.) then it is translated into its wrapper type (Integer, Float, etc.). If the passed class is not a primitive then it is just returned.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.