sofya.base
Class Utility

java.lang.Object
  extended by sofya.base.Utility

public class Utility
extends java.lang.Object

Defines general utility methods that belong to no class in particular.

Version:
12/07/2004
Author:
Alex Kinneer

Method Summary
static java.lang.Class[] typesToClasses(org.apache.bcel.generic.Type[] ts)
          Converts an array of BCEL Type objects to their corresponding java.lang.Class objects.
static java.lang.Class typeToClass(org.apache.bcel.generic.Type t)
          Converts a BCEL Type object to its corresponding java.lang.Class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

typeToClass

public static java.lang.Class typeToClass(org.apache.bcel.generic.Type t)
                                   throws java.lang.ClassNotFoundException
Converts a BCEL Type object to its corresponding java.lang.Class.

Parameters:
t - BCEL type object to be converted.
Returns:
The class object corresponding to the given BCEL type.
Throws:
java.lang.ClassNotFoundException - If the corresponding class cannot be found by the classloader (most often because it is not on the classpath), or if the BCEL type is Type.UNKNOWN.

typesToClasses

public static java.lang.Class[] typesToClasses(org.apache.bcel.generic.Type[] ts)
                                        throws java.lang.ClassNotFoundException
Converts an array of BCEL Type objects to their corresponding java.lang.Class objects.

Parameters:
ts - BCEL type objects to be converted.
Returns:
The class objects corresponding to the given BCEL types.
Throws:
java.lang.ClassNotFoundException - If a corresponding class cannot be found by the classloader (most often because it is not on the classpath), or if a BCEL type is Type.UNKNOWN.