Package org.jboss.metadata.test
Class Classes
- java.lang.Object
-
- org.jboss.metadata.test.Classes
-
public final class Classes extends Object
A collection ofClassutilities.- Version:
- $Revision: 2787 $
- Author:
- Jason Dillon, Scott Stark, Dimitris Andreadis
-
-
Constructor Summary
Constructors Constructor Description Classes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MethodgetAttributeGetter(Class cls, String attr)Returns attribute's getter method.static ClassgetPrimitiveWrapper(Class type)Get the wrapper class for the given primitive type.static booleanisPrimitiveWrapper(Class type)Check if the given class is a primitive wrapper class.
-
-
-
Method Detail
-
getPrimitiveWrapper
public static Class getPrimitiveWrapper(Class type)
Get the wrapper class for the given primitive type.- Parameters:
type- Primitive class.- Returns:
- Wrapper class for primitive.
- Throws:
IllegalArgumentException- Type is not a primitive class
-
isPrimitiveWrapper
public static boolean isPrimitiveWrapper(Class type)
Check if the given class is a primitive wrapper class.- Parameters:
type- Class to check.- Returns:
- True if the class is a primitive wrapper.
-
getAttributeGetter
public static Method getAttributeGetter(Class cls, String attr) throws NoSuchMethodException
Returns attribute's getter method. If the method not found then NoSuchMethodException will be thrown.- Parameters:
cls- the class the attribute belongs tooattr- the attribute's name- Returns:
- attribute's getter method
- Throws:
NoSuchMethodException- if the getter was not found
-
-