Package cc.concurrent.mango.exception

Examples of cc.concurrent.mango.exception.UnreachableCodeException


                }
                sql.append(")");
            } else if (node instanceof ASTExpression) {
                sql.append(((ASTExpression) node).value(context));
            } else {
                throw new UnreachableCodeException();
            }
            if (i < jjtGetNumChildren() - 1) {
                sql.append(" "); // 节点之间添加空格
            }
        }
View Full Code Here


            } else if (isForSet) {
                return hitValueSet;
            } else if (isForArray) {
                return ArrayUtil.toArray(hitValueList, valueClass);
            } else {
                throw new UnreachableCodeException();
            }
        }
View Full Code Here

        if (int.class.equals(method.getReturnType())) {
            returnType = int.class;
        } else if (long.class.equals(method.getReturnType())) {
            returnType = long.class;
        } else {
            throw new UnreachableCodeException();
        }
    }
View Full Code Here

    public void setParameter(String parameter) {
        Pattern p = Pattern.compile(":(\\w+)(\\.\\w+)*");
        Matcher m = p.matcher(parameter);
        if (!m.matches()) {
            throw new UnreachableCodeException();
        }
        parameterName = m.group(1);
        propertyPath = parameter.substring(m.end(1));
        if (!propertyPath.isEmpty()) {
            propertyPath = propertyPath.substring(1)// .a.b.c变为a.b.c
View Full Code Here

        } else if (java.sql.Blob.class.equals(requiredType)) {
            value = rs.getBlob(index);
        } else if (java.sql.Clob.class.equals(requiredType)) {
            value = rs.getClob(index);
        } else {
            throw new UnreachableCodeException();
        }

        // Perform was-null check if demanded (for results that the
        // JDBC driver returns as primitives).
        if (wasNullCheck && value != null && rs.wasNull()) {
View Full Code Here

    public void setParameter(String parameter) {
        Pattern p = Pattern.compile(":(\\w+)(\\.\\w+)*");
        Matcher m = p.matcher(parameter);
        if (!m.matches()) {
            throw new UnreachableCodeException();
        }
        parameterName = m.group(1);
        propertyPath = parameter.substring(m.end(1));
        if (!propertyPath.isEmpty()) {
            propertyPath = propertyPath.substring(1)// .a.b.c变为a.b.c
View Full Code Here

                }
                sql.append(sb).append(")");
            } else if (node instanceof ASTExpression) {
                sql.append(((ASTExpression) node).value(context));
            } else {
                throw new UnreachableCodeException();
            }
            node = node.next;
        }
        return sql.toString();
    }
View Full Code Here

                    ASTString str = (ASTString) node;
                    sb.append(str.getGroupValue());
                } else if (node instanceof ASTNonIterableParameter) {
                    sb.append("?");
                } else {
                    throw new UnreachableCodeException();
                }
                node = node.next;
            }
            sql = sb.toString();
        }
View Full Code Here

    public void setParameter(String parameter) {
        Pattern p = Pattern.compile(":(\\w+)(\\.\\w+)*");
        Matcher m = p.matcher(parameter);
        if (!m.matches()) {
            throw new UnreachableCodeException();
        }
        parameterName = m.group(1);
        propertyPath = parameter.substring(m.end(1));
        if (!propertyPath.isEmpty()) {
            propertyPath = propertyPath.substring(1)// .a.b.c变为a.b.c
View Full Code Here

*/
public class TypeUtil {

    public static Type getPropertyType(Type type, String parameterName, String propertyPath) {
        if (Strings.isNullOrEmpty(propertyPath)) {
            throw new UnreachableCodeException();
        }

        int pos = propertyPath.indexOf('.');
        StringBuffer parentPath = new StringBuffer(propertyPath.length());
        while (pos > -1) {
View Full Code Here

TOP

Related Classes of cc.concurrent.mango.exception.UnreachableCodeException

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.