- switch(ValueType.values()[valueType]){
- case SHORT_TYPE: {
- return Short.valueOf(value);
- }
- case BOOL_TYPE: {
- return Boolean.valueOf(value);
- }
- case BYTE_TYPE: {
- return Byte.valueOf(value);
- }
- case INT_TYPE : {
- return Integer.valueOf(value);
- }
- case LONG_TYPE: {
- return Long.valueOf(value);
- }
- case QNAME_TYPE: {
- return QNameFactory.create(value);
- }
- case BIG_INTEGER_TYPE: {
- return new BigInteger(value);
- }
- case BIG_DECIMAL_TYPE: {
- return new BigDecimal(value);
- }
- default: {
- return value;
- }
- }