Package com.redhat.ceylon.compiler.java.metadata

Examples of com.redhat.ceylon.compiler.java.metadata.TypeInfo


    private void validateVTMethodUnchecked(Class<?> clazz, Method classMethod) {
        String mthName = clazz.getName() + "::" + classMethod.getName() + "()";
        System.err.println(mthName);
        Method staticMethod = findStaticCompanionMethod(clazz, classMethod);
        Assert.assertNotNull("Static companion for " + mthName + " not found", staticMethod);
        TypeInfo returnTypeInfo = classMethod.getAnnotation(TypeInfo.class);
        Assert.assertEquals("Returns types for static and class methods " + mthName + " do not coincide", staticMethod.getReturnType(), getUnboxedType(classMethod.getReturnType(), returnTypeInfo));
    }
View Full Code Here


        Class<?>[] instancePTs = classMethod.getParameterTypes();
        Annotation[][] instanceAnnos = classMethod.getParameterAnnotations();
        Class<?>[] staticPTs = new Class<?>[instancePTs.length + 1];
        staticPTs[0] = getUnboxedType(clazz, clazz.getAnnotation(TypeInfo.class));
        for (int i = 0; i < instancePTs.length; i++) {
            TypeInfo typeInfo = findAnnotation(instanceAnnos[i], TypeInfo.class);
            staticPTs[i + 1] = getUnboxedType(instancePTs[i], typeInfo);
        }
        try {
            return clazz.getMethod(classMethod.getName(), staticPTs);
        } catch (NoSuchMethodException|SecurityException e) {
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.java.metadata.TypeInfo

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.