Package jodd.typeconverter

Examples of jodd.typeconverter.TypeConversionException


        className = StringUtil.substring(className, 0, -6);
      }

      return ClassLoaderUtil.loadClass(className);
    } catch (ClassNotFoundException cnfex) {
      throw new TypeConversionException(value, cnfex);
    }
  }
View Full Code Here


      if (StringUtil.startsWithChar(stringValue, '+')) {
        stringValue = stringValue.substring(1);
      }
      return Integer.valueOf(stringValue);
    } catch (NumberFormatException nfex) {
      throw new TypeConversionException(value, nfex);
    }
  }
View Full Code Here

    if (value instanceof File) {
      File file = (File) value;
      try {
        return FileUtil.toURL(file);
      } catch (MalformedURLException muex) {
        throw new TypeConversionException(value, muex);
      }
    }

    if (value instanceof URI) {
      URI uri = (URI) value;
      try {
        return uri.toURL();
      } catch (MalformedURLException muex) {
        throw new TypeConversionException(value, muex);
      }
    }

    try {
      return new URL(value.toString());
    } catch (MalformedURLException muex) {
      throw new TypeConversionException(value, muex);
    }
  }
View Full Code Here

      if (StringUtil.startsWithChar(stringValue, '+')) {
        stringValue = stringValue.substring(1);
      }
      return Long.valueOf(stringValue);
    } catch (NumberFormatException nfex) {
      throw new TypeConversionException(value, nfex);
    }
  }
View Full Code Here

      if (StringUtil.startsWithChar(stringValue, '+')) {
        stringValue = stringValue.substring(1);
      }
      return Double.valueOf(stringValue);
    } catch (NumberFormatException nfex) {
      throw new TypeConversionException(value, nfex);
    }
  }
View Full Code Here

TOP

Related Classes of jodd.typeconverter.TypeConversionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.