FileDocCategorySizeDatePackage
Utils.javaAPI DocJBoss 4.2.12267Fri Jul 13 21:02:30 BST 2007org.jboss.aspects.asynchronous.aspects

Utils

public class Utils extends Object
author
{Claude Hussenet Independent Consultant}.
version
$Revision: 57186 $

Fields Summary
Constructors Summary
Methods Summary
public static java.lang.ObjectreturnInitObject(java.lang.Class returnType)


      if (!returnType.isPrimitive())

         return null;

      else if (returnType.equals(Void.TYPE))

         return null;

      else if (returnType.equals(Boolean.TYPE))
      {

         return Boolean.FALSE;

      }
      else if (returnType.equals(Integer.TYPE))
      {

         return new Integer(0);

      }
      else if (returnType.equals(Long.TYPE))
      {

         return new Long(0);

      }
      else if (returnType.equals(Float.TYPE))
      {

         return new Float(0);

      }
      else if (returnType.equals(Double.TYPE))
      {

         return new Double(0);

      }
      else if (returnType.equals(Character.TYPE))
      {

         return new Character('\0");

      }
      else if (returnType.equals(Byte.TYPE))
      {

         return new Byte((byte) 0);

      }
      else if (returnType.equals(Short.TYPE))
      {

         return new Short((short) 0);

      }
      else

         return null;