Package org.opengis.parameter

Examples of org.opengis.parameter.InvalidParameterTypeException


        } catch (URISyntaxException exception) {
            cause = exception;
        }
        final String name = Verifier.getName(descriptor);
        if (value != null) {
            throw new InvalidParameterTypeException(getClassTypeError(), name);
        }
        throw new IllegalStateException(Errors.format(Errors.Keys.MissingValueForParameter_1, cause, name));
    }
View Full Code Here


     * Returns the exception to throw when an incompatible method is invoked for the value type.
     */
    private IllegalStateException incompatibleValue(final Object value) {
        final String name = Verifier.getName(descriptor);
        if (value != null) {
            return new InvalidParameterTypeException(getClassTypeError(), name);
        }
        return new IllegalStateException(Errors.format(Errors.Keys.MissingValueForParameter_1, name));
    }
View Full Code Here

            ensureNonNull("values", values, i);
            final GeneralParameterDescriptor descriptor = values[i].getDescriptor();
            final int[] count = occurences.get(descriptor);
            if (count == null) {
                final String name = getName(descriptor);
                throw new InvalidParameterTypeException(Errors.format(
                          ErrorKeys.ILLEGAL_DESCRIPTOR_FOR_PARAMETER_$1, name), name);
            }
            count[0]++;
        }
        /*
 
View Full Code Here

        }
        final String name = getName(descriptor);
        if (value == null) {
            throw new IllegalStateException(Errors.format(ErrorKeys.MISSING_PARAMETER_$1, name));
        }
        throw new InvalidParameterTypeException(getClassTypeError(), name);
    }
View Full Code Here

        }
        final String name = getName(descriptor);
        if (value == null) {
            throw new IllegalStateException(Errors.format(ErrorKeys.MISSING_PARAMETER_$1, name));
        }
        throw new InvalidParameterTypeException(getClassTypeError(), name);
    }
View Full Code Here

        }
        final String name = getName(descriptor);
        if (value == null) {
            throw new IllegalStateException(Errors.format(ErrorKeys.MISSING_PARAMETER_$1, name));
        }
        throw new InvalidParameterTypeException(getClassTypeError(), name);
    }
View Full Code Here

        }
        final String name = getName(descriptor);
        if (value == null) {
            throw new IllegalStateException(Errors.format(ErrorKeys.MISSING_PARAMETER_$1, name));
        }
        throw new InvalidParameterTypeException(getClassTypeError(), name);
    }
View Full Code Here

         */
        final String name = getName(descriptor);
        if (value == null) {
            throw new IllegalStateException(Errors.format(ErrorKeys.MISSING_PARAMETER_$1, name));
        }
        final InvalidParameterTypeException exception =
                new InvalidParameterTypeException(getClassTypeError(), name);
        if (cause != null) {
            exception.initCause(cause);
        }
        throw exception;
    }
View Full Code Here

    /**
     * Returns the exception to be throws for an operation on a wrong parameter type.
     */
    private InvalidParameterTypeException invalidType(final ClassCastException cause) {
        final InvalidParameterTypeException exception = new InvalidParameterTypeException(
                Errors.format(ErrorKeys.ILLEGAL_OPERATION_FOR_VALUE_CLASS_$1, getType()),
                getName(descriptor));
        exception.initCause(cause);
        return exception;
    }
View Full Code Here

     *
     * @return Never return.
     * @throws InvalidParameterTypeException The value is not a reference to a file or an URI.
     */
    public URI valueFile() throws InvalidParameterTypeException {
        throw new InvalidParameterTypeException(getClassTypeError(), Parameter.getName(descriptor));
    }
View Full Code Here

TOP

Related Classes of org.opengis.parameter.InvalidParameterTypeException

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.