Package com.redhat.ceylon.compiler.loader.model

Examples of com.redhat.ceylon.compiler.loader.model.JavaBeanValue


            return false;
        }
    }

    private void addValue(ClassOrInterface klass, MethodMirror methodMirror, String methodName, boolean isCeylon) {
        JavaBeanValue value = new JavaBeanValue(methodMirror);
        value.setGetterName(methodMirror.getName());
        value.setContainer(klass);
        value.setScope(klass);
        value.setUnit(klass.getUnit());
        ProducedType type = null;
        try{
            setMethodOrValueFlags(klass, methodMirror, value, isCeylon);
        }catch(ModelResolutionException x){
            // collect an error in its type
            type = logModelResolutionException(x, klass, "getter '"+methodName+"' (checking if it is an overriding method");
        }
        value.setName(Util.strip(methodName, isCeylon, value.isShared()));

        // do not log an additional error if we had one from checking if it was overriding
        if(type == null)
            type = obtainType(methodMirror.getReturnType(), methodMirror, klass, Decl.getModuleContainer(klass), VarianceLocation.INVARIANT,
                              "getter '"+methodName+"'", klass);
        value.setType(type);
        // special case for hash attributes which we want to pretend are of type long internally
        if(value.isShared() && methodName.equals("hash"))
            type.setUnderlyingType("long");
        value.setUncheckedNullType((!isCeylon && !methodMirror.getReturnType().isPrimitive()) || isUncheckedNull(methodMirror));
        type.setRaw(isRaw(Decl.getModuleContainer(klass), methodMirror.getReturnType()));

        markUnboxed(value, methodMirror, methodMirror.getReturnType());
        markTypeErased(value, methodMirror, methodMirror.getReturnType());
        markUntrustedType(value, methodMirror, methodMirror.getReturnType());
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.loader.model.JavaBeanValue

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.