Package com.headius.invokebinder

Examples of com.headius.invokebinder.InvalidTransformException


    }

    public MethodType down(MethodType type) {
        int last = source.parameterCount() - 1;
        if (!source.parameterArray()[last].isArray()) {
            throw new InvalidTransformException("trailing argument is not []: " + source);
        }

        type = type.dropParameterTypes(last, last + 1);
        return type.appendParameterTypes(spreadTypes);
    }
View Full Code Here


            case 0:
                return type.changeReturnType(void.class);
            case 1:
                return type.changeReturnType(function.type().parameterType(0));
            default:
                throw new InvalidTransformException("return filter " + function + " does not accept zero or one argument");
        }
    }
View Full Code Here

    public MethodType down(MethodType type) {
        Class[] types = new Class[reorder.length];
        for (int i = 0; i < reorder.length; i++) {
            int typeIndex = reorder[i];
            if (typeIndex < 0 || typeIndex >= type.parameterCount()) {
                throw new InvalidTransformException("one or more permute indices (" + Arrays.toString(reorder) + ") out of bounds for " + source);
            }

            types[i] = type.parameterType(reorder[i]);
        }
        return MethodType.methodType(type.returnType(), types);
View Full Code Here

TOP

Related Classes of com.headius.invokebinder.InvalidTransformException

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.