Package java.lang

Examples of java.lang.IllegalArgumentException


    public String getOutputProperty(String name)
  throws IllegalArgumentException
    {
  if (!validOutputProperty(name)) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name);
      throw new IllegalArgumentException(err.toString());
  }
  return _properties.getProperty(name);
    }
View Full Code Here


    if (validOutputProperty(name)) {
        _properties.setProperty(name, properties.getProperty(name));
    }
    else {
        ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name);
        throw new IllegalArgumentException(err.toString());
    }
      }
  }
  else {
      _properties = _propertiesClone;
View Full Code Here

    public void setOutputProperty(String name, String value)
  throws IllegalArgumentException
    {
  if (!validOutputProperty(name)) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name);
      throw new IllegalArgumentException(err.toString());
  }
  _properties.setProperty(name, value);
    }
View Full Code Here

    public void sendRedirect(String location)
    throws IOException, IllegalArgumentException {
        if (location == null) {
            String msg = sm.getString("hsrf.redirect.iae");

            throw new IllegalArgumentException(msg);
  }

        // XXX
  // we want to do a better check than this in the future,
  // but as this isn't used on every hit, we'll do it the
View Full Code Here

      if (this.data != null) {
          this.size = this.data.length;
      }
      this.data_nio = null;
  } else {
      throw new IllegalArgumentException("Attempting to use a " +
          "non-direct ByteBuffer without a backing byte array.");
  }
    }
View Full Code Here

    @param reuse
    whether to reuse the buffer
    */
    public void setReuseBuffer(boolean reuse) {
        if (data_nio != null)
            throw new IllegalArgumentException("Can only set the reuse flag on" +
                   " DatabaseEntry classes with a underlying byte[] data");

        if (reuse)
            flags &= ~(DbConstants.DB_DBT_MALLOC | DbConstants.DB_DBT_USERMEM);
        else {
View Full Code Here

     * if the specified percentage value is unacceptable
   */
  public static void checkValidPercent(double percent) throws IllegalArgumentException
  {
    if(percent > 1 || percent < 0)
      throw new IllegalArgumentException(percent + " is not a valid percentage value. It should be <= 1 && >= 0");
  }
View Full Code Here

     *
     * @param clazz interfaces (ONLY, no class or primitives) to be casted to
     */
    public static <T> T _proxyClass(Object target, Class<T> clazz) {
        if (!clazz.isInterface()) {
            throw new IllegalArgumentException("Class " + clazz + " is not an interface");
        }
        return target == null ? null : (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class[]{clazz},
                _proxyClassHandler(target));
    }
View Full Code Here

    String outputPath = null;
    String configFile = null;

    // Read the command line arguments.
    if (args.length <  1)
      throw new IllegalArgumentException("Example JAR must be passed an output path.");

    outputPath = args[0];

    if (args.length >= 2)
      configFile = args[1];
View Full Code Here

     *
     * @param  column  new sort column
     **/
    public void setSortColumn(int column) {
        if (column >= getColumnCount()) {
            throw new IllegalArgumentException("Column number is out of range.");
        }

        _columnToSort = column;

        sortAndUpdate();
View Full Code Here

TOP

Related Classes of java.lang.IllegalArgumentException

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.