Example usage for org.apache.commons.beanutils MethodUtils getPrimitiveType

List of usage examples for org.apache.commons.beanutils MethodUtils getPrimitiveType

Introduction

In this page you can find the example usage for org.apache.commons.beanutils MethodUtils getPrimitiveType.

Prototype

public static Class getPrimitiveType(Class wrapperType) 

Source Link

Document

Gets the class for the primitive type corresponding to the primitive wrapper class given.

Usage

From source file:org.deegree.db.datasource.DataSourceInitializer.java

Object getJavaArg(Argument argument) throws ClassNotFoundException {
    Class<?> parameterClass = null;
    try {//from   w  w w .  j  a  v a2s.c o  m
        parameterClass = getClass(argument.getJavaClass());
        final Class<?> primitiveClass = MethodUtils.getPrimitiveType(parameterClass);
        if (primitiveClass != null) {
            parameterClass = primitiveClass;
        }
    } catch (ClassNotFoundException e) {
        throw e;
    }
    return ConvertUtils.convert(argument.getValue(), parameterClass);
}