Examples of InvalidTypeException


Examples of br.com.caelum.iogi.exceptions.InvalidTypeException

public class Assert {

  public static void isNotARawType(final Target<?> target) {
    if (!target.isParameterized())
      throw new InvalidTypeException("Expecting a parameterized list type, got raw type \"%s\" instead", target.getType());
  }
View Full Code Here

Examples of com.amazonaws.services.cloudsearch.model.InvalidTypeException

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("InvalidType"))
            return null;

        InvalidTypeException e = (InvalidTypeException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

Examples of com.amazonaws.services.cloudsearchv2.model.InvalidTypeException

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("InvalidType"))
            return null;

        InvalidTypeException e = (InvalidTypeException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

Examples of com.datastax.driver.core.exceptions.InvalidTypeException

            if (value.equalsIgnoreCase(Boolean.FALSE.toString()))
                return false;
            if (value.equalsIgnoreCase(Boolean.TRUE.toString()))
                return true;

            throw new InvalidTypeException(String.format("Cannot parse boolean value from \"%s\"", value));
        }
View Full Code Here

Examples of com.datastax.driver.core.exceptions.InvalidTypeException

            return deserializeNoBoxing(bytes);
        }

        public boolean deserializeNoBoxing(ByteBuffer bytes) {
            if (bytes.remaining() != 1)
                throw new InvalidTypeException("Invalid boolean value, expecting 1 byte but got " + bytes.remaining());

            return bytes.get(bytes.position()) != 0;
        }
View Full Code Here

Examples of com.datastax.driver.core.exceptions.InvalidTypeException

        @Override
        public BigDecimal parse(String value) {
            try {
                return new BigDecimal(value);
            } catch (NumberFormatException e) {
                throw new InvalidTypeException(String.format("Cannot parse decimal value from \"%s\"", value));
            }
        }
View Full Code Here

Examples of com.datastax.driver.core.exceptions.InvalidTypeException

        }

        @Override
        public BigDecimal deserialize(ByteBuffer bytes) {
            if (bytes.remaining() < 4)
                throw new InvalidTypeException("Invalid decimal value, expecting at least 4 bytes but got " + bytes.remaining());

            bytes = bytes.duplicate();
            int scale = bytes.getInt();
            byte[] bibytes = new byte[bytes.remaining()];
            bytes.get(bibytes);
View Full Code Here

Examples of com.datastax.driver.core.exceptions.InvalidTypeException

        @Override
        public Double parse(String value) {
            try {
                return Double.parseDouble(value);
            } catch (NumberFormatException e) {
                throw new InvalidTypeException(String.format("Cannot parse 64-bits double value from \"%s\"", value));
            }
        }
View Full Code Here

Examples of com.datastax.driver.core.exceptions.InvalidTypeException

            return deserializeNoBoxing(bytes);
        }

        public double deserializeNoBoxing(ByteBuffer bytes) {
            if (bytes.remaining() != 8)
                throw new InvalidTypeException("Invalid 64-bits double value, expecting 8 bytes but got " + bytes.remaining());

            return bytes.getDouble(bytes.position());
        }
View Full Code Here

Examples of com.datastax.driver.core.exceptions.InvalidTypeException

        @Override
        public Float parse(String value) {
            try {
                return Float.parseFloat(value);
            } catch (NumberFormatException e) {
                throw new InvalidTypeException(String.format("Cannot parse 32-bits float value from \"%s\"", value));
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.