Package com.addthis.codec.json

Examples of com.addthis.codec.json.CodecExceptionLineNumber


        if (value == null) {
            if (isRequired()) {
                Exception ex = new RequiredFieldException("missing required field '" +
                                                          this.getName() + "' for " + dst, getName());
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        if (!validate(value)) {
            Exception ex = new ValidationException("invalid field value '" + value +
                "' for " + this.getName() + " in " + dst, getName());
            throw new CodecExceptionLineNumber(ex, valInfo);
        }
        try {
            if ((value.getClass() == String.class) && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here


        if (value == null) {
            Object currentValue;
            try {
                currentValue = get(dst);
            } catch (Exception ex) {
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }

            if (isRequired() && currentValue == null) {
                Exception ex = new RequiredFieldException("missing required field '" +
                    this.getName() + "' for " + dst, getName());
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        if (!validate(value)) {
            Exception ex = new ValidationException("invalid field value '" + value +
                "' for " + this.getName() + " in " + dst, getName());
            throw new CodecExceptionLineNumber(ex, valInfo);
        }
        try {
            if (value.getClass() == String.class && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here

        if (value == null) {
            Object currentValue;
            try {
                currentValue = get(dst);
            } catch (Exception ex) {
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }

            if (isRequired() && currentValue == null) {
                Exception ex = new RequiredFieldException("missing required field '" +
                    this.getName() + "' for " + dst, getName());
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        if (!validate(value)) {
            Exception ex = new ValidationException("invalid field value '" + value +
                "' for " + this.getName() + " in " + dst, getName());
            throw new CodecExceptionLineNumber(ex, valInfo);
        }
        try {
            if (value.getClass() == String.class && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here

        if (value == null) {
            if (isRequired()) {
                Exception ex = new RequiredFieldException("missing required field '" +
                                                          this.getName() + "' for " + dst, getName());
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        try {
            if ((value.getClass() == String.class) && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here

        if (value == null) {
            Object currentValue;
            try {
                currentValue = get(dst);
            } catch (Exception ex) {
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }

            if (isRequired() && currentValue == null) {
                Exception ex = new RequiredFieldException("missing required field '" +
                    this.getName() + "' for " + dst, getName());
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        if (!validate(value)) {
            Exception ex = new ValidationException("invalid field value '" + value +
                "' for " + this.getName() + " in " + dst, getName());
            throw new CodecExceptionLineNumber(ex, valInfo);
        }
        try {
            if (value.getClass() == String.class && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here

        if (value == null) {
            Object currentValue;
            try {
                currentValue = get(dst);
            } catch (Exception ex) {
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }

            if (isRequired() && currentValue == null) {
                Exception ex = new RequiredFieldException("missing required field '" +
                    this.getName() + "' for " + dst, getName());
                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        if (!validate(value)) {
            Exception ex = new ValidationException("invalid field value '" + value +
                "' for " + this.getName() + " in " + dst, getName());
            throw new CodecExceptionLineNumber(ex, valInfo);
        }
        try {
            if (value.getClass() == String.class && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here

TOP

Related Classes of com.addthis.codec.json.CodecExceptionLineNumber

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.