Package ceylon.language.meta.declaration

Examples of ceylon.language.meta.declaration.ValueDeclaration


        return iterable$this.interpose$step(arg0, arg1);
    }

    @Override
    public Iterator<? extends Sequence<? extends Object>> iterator() {
        ValueDeclaration valueDecl = null;
        return new Singleton(null, new Tuple(null, new Object[]{
                valueDecl,
                value
        })).iterator();
    }
View Full Code Here


                continue;
            ceylon.language.meta.declaration.OpenClassType caseClassType = (ceylon.language.meta.declaration.OpenClassType)it;
            ceylon.language.meta.declaration.ClassDeclaration caseClass = caseClassType.getDeclaration();
            if(!caseClass.getAnonymous())
                continue;
            ValueDeclaration valueDeclaration = caseClass.getContainingPackage().getValue(caseClass.getName());
            ceylon.language.meta.model.Value<? extends Type,? super Object> valueModel =
                    valueDeclaration.<Type,Object>apply($reifiedType, TypeDescriptor.NothingType);
            Type value = valueModel.get();
            ret.set(count++, value);
        }
        return ret.take(count).sequence();
    }
View Full Code Here

       
        dtor.putTypeArgument(
                ((GenericDeclaration)Metamodel.getOrCreateMetamodel(Tuple.class)).getTypeParameterDeclaration("Rest"),
                Metamodel.getAppliedMetamodel(reifiedRest));
       
        ValueDeclaration firstAttribute = (ValueDeclaration)((ClassDeclaration)Metamodel.getOrCreateMetamodel(Tuple.class)).getMemberDeclaration(ValueDeclaration.$TypeDescriptor$, "first");
        dtor.putValue(reifiedFirst, firstAttribute, getFirst());
       
        ValueDeclaration restAttribute = (ValueDeclaration)((ClassDeclaration)Metamodel.getOrCreateMetamodel(Tuple.class)).getMemberDeclaration(ValueDeclaration.$TypeDescriptor$, "rest");
        dtor.putValue(reifiedRest, restAttribute, getRest());
    }
View Full Code Here

        try {
            // hack: recover the reified type arguments stored in the array
            TypeDescriptor reifiedFirst = (TypeDescriptor)this.array[0];
            TypeDescriptor reifiedRest = (TypeDescriptor)this.array[1];
           
            ValueDeclaration firstAttribute = (ValueDeclaration)((ClassDeclaration)Metamodel.getOrCreateMetamodel(Tuple.class)).getMemberDeclaration(ValueDeclaration.$TypeDescriptor$, "first");
            ValueDeclaration restAttribute = (ValueDeclaration)((ClassDeclaration)Metamodel.getOrCreateMetamodel(Tuple.class)).getMemberDeclaration(ValueDeclaration.$TypeDescriptor$, "rest");
           
            java.lang.Object firstValOrRef = deconstructed.<First>getValue(reifiedFirst, firstAttribute);
            java.lang.Object restValOrRef = deconstructed.<Rest>getValue(reifiedRest, restAttribute);
           
            First first;
View Full Code Here

        Deconstructor dtor = deconstructor.$call$(ceylon.language.meta.typeLiteral_.typeLiteral($getType$()));
       
        ceylon.language.meta.declaration.TypeParameter elementTypeParameter = ((GenericDeclaration)Metamodel.getOrCreateMetamodel(Array.class)).getTypeParameterDeclaration("Element");
        dtor.putTypeArgument(elementTypeParameter, Metamodel.getAppliedMetamodel(this.$reifiedElement));
       
        ValueDeclaration sizeAttribute = (ValueDeclaration)((ClassDeclaration)Metamodel.getOrCreateMetamodel(Array.class)).getMemberDeclaration(ceylon.language.meta.declaration.ValueDeclaration.$TypeDescriptor$, "size");
       
        dtor.putValue(Integer.$TypeDescriptor$,
                sizeAttribute,
                Integer.instance(getSize()));
       
View Full Code Here

        try {
            //ceylon.language.meta.declaration.TypeParameter elementTypeParameter = ((GenericDeclaration)Metamodel.getOrCreateMetamodel(Array.class)).getTypeParameterDeclaration("Element");
            //TypeDescriptor reifiedElement = Metamodel.getTypeDescriptor(dted.getTypeArgument(elementTypeParameter));
            //Util.setter(MethodHandles.lookup(), "$reifiedElement").invokeExact(this, reifiedElement);
           
            ValueDeclaration sizeAttribute = (ValueDeclaration)((ClassDeclaration)Metamodel.getOrCreateMetamodel(Array.class)).getMemberDeclaration(ceylon.language.meta.declaration.ValueDeclaration.$TypeDescriptor$, "size");
            Integer size = (Integer)dted.getValue(Integer.$TypeDescriptor$, sizeAttribute);
            Util.setter(MethodHandles.lookup(), "size").invokeExact(this, Util.toInt(size.value));
            Util.setter(MethodHandles.lookup(), "array").invokeExact(this, createArrayWithElement(this.$reifiedElement, Util.toInt(size.value), (Element)null));
           
            for (int ii = 0; ii < size.value; ii++) {
View Full Code Here

        return result;
    }
   
   
    protected ValueDeclaration makeValue(Declaration packageOrType, String val) {
        final ValueDeclaration result;
        if (packageOrType instanceof Package) {
            result = ((Package)packageOrType).getValue(val);
        } else if (packageOrType instanceof ClassOrInterfaceDeclaration) {
            result = ((ClassOrInterfaceDeclaration)packageOrType).<ValueDeclaration>getMemberDeclaration(ValueDeclaration.$TypeDescriptor$, val);
        } else {
View Full Code Here

TOP

Related Classes of ceylon.language.meta.declaration.ValueDeclaration

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.