saffron.runtime
Class SaffronUtil

java.lang.Object
  |
  +--saffron.runtime.SaffronUtil

public class SaffronUtil
extends Object

Miscellaneous utility functions used by generated code.

Since:
27 October, 2001
Version:
$Id: //open/saffron/src/main/saffron/runtime/SaffronUtil.java#2 $
Author:
jhyde

Constructor Summary
SaffronUtil()
           
 
Method Summary
static Class[] classesForName(String name)
          Looks up a class by name, returns an array of one class if the class is not found, an array of zero classes if not.
static boolean[] copyInto(Collection v, boolean[] a)
          Copies a collection into a boolean array.
static int[] copyInto(Collection v, int[] a)
          Copies a collection into an int array.
static Object[] copyInto(Collection c, Object[] a)
          Copies a collection into an array.
static boolean[] copyInto(Vector v, boolean[] a)
          Copies a vector into a boolean array.
static int[] copyInto(Vector v, int[] a)
          Copies a vector into a int array.
static Object[] copyInto(Vector v, Object[] a)
          Copies a vector into an array.
static double doubleValue(Object o)
          Converts an Object to an double.
static boolean equals(Object o, Object p)
          Returns whether two objects are equal or are both null.
static int intValue(Object o)
          Converts an Object to an int.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaffronUtil

public SaffronUtil()
Method Detail

copyInto

public static boolean[] copyInto(Vector v,
                                 boolean[] a)
Copies a vector into a boolean array. Equivalent to Vector.copyInto(java.lang.Object[]).


copyInto

public static int[] copyInto(Vector v,
                             int[] a)
Copies a vector into a int array. Equivalent to Vector.copyInto(java.lang.Object[]).


copyInto

public static Object[] copyInto(Vector v,
                                Object[] a)
Copies a vector into an array. If the array is not large enough, allocates a new array with the same component type as a.


copyInto

public static boolean[] copyInto(Collection v,
                                 boolean[] a)
Copies a collection into a boolean array. Equivalent to Collection.toArray(Object[]).


copyInto

public static int[] copyInto(Collection v,
                             int[] a)
Copies a collection into an int array. Equivalent to Collection.toArray(Object[]).


copyInto

public static Object[] copyInto(Collection c,
                                Object[] a)
Copies a collection into an array. If the array is not large enough, allocates a new array with the same component type as a. Equivalent to Collection.toArray(Object[]).


intValue

public static final int intValue(Object o)
Converts an Object to an int.


doubleValue

public static final double doubleValue(Object o)
Converts an Object to an double.


classesForName

public static Class[] classesForName(String name)
Looks up a class by name, returns an array of one class if the class is not found, an array of zero classes if not.


equals

public static boolean equals(Object o,
                             Object p)
Returns whether two objects are equal or are both null.


SourceForge.net_Logo