net.sf.jga.parser
Class ParserUtils

java.lang.Object
  extended by net.sf.jga.parser.ParserUtils

public class ParserUtils
extends java.lang.Object

ParserUtils.java

Copyright © 2005 David A. Hall

Author:
David A. Hall

Method Summary
static java.lang.Class<?> getBoxedType(java.lang.Class<?> type)
          Returns a boxed version of the input type if it is a primitive.
static java.lang.String getSimpleName(java.lang.Class<?> clasz)
          Returns the simple name of a class.
static java.lang.Class<?> getUnboxedType(java.lang.Class<?> type)
          Returns an unboxed version of the input type if it is a reference.
static boolean isBoxedType(java.lang.Class<?> primitive, java.lang.Class<?> boxedType)
          Returns true if first class is the boxed type of the second
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBoxedType

public static java.lang.Class<?> getBoxedType(java.lang.Class<?> type)
Returns a boxed version of the input type if it is a primitive. Otherwise, returns the input type.


getUnboxedType

public static java.lang.Class<?> getUnboxedType(java.lang.Class<?> type)
Returns an unboxed version of the input type if it is a reference. Otherwise, returns the input type.


isBoxedType

public static boolean isBoxedType(java.lang.Class<?> primitive,
                                  java.lang.Class<?> boxedType)
Returns true if first class is the boxed type of the second


getSimpleName

public static java.lang.String getSimpleName(java.lang.Class<?> clasz)
Returns the simple name of a class. The built in method in 1.5 is unavailable in 1.4, and slightly buggy when it comes to names of nested classes.



Copyright © 2002-2006 David A. Hall. All Rights Reserved.