Examples of inherits()


Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

                out(".negated");
            }
            return;
        }
        final TypeDeclaration d = that.getTerm().getTypeModel().getDeclaration();
        final boolean isint = d.inherits(that.getUnit().getIntegerDeclaration());
        Operators.unaryOp(that, isint?"(-":null, isint?")":".negated", this);
    }

    @Override public void visit(final Tree.PositiveOp that) {
        final TypeDeclaration d = that.getTerm().getTypeModel().getDeclaration();
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

        Operators.unaryOp(that, isint?"(-":null, isint?")":".negated", this);
    }

    @Override public void visit(final Tree.PositiveOp that) {
        final TypeDeclaration d = that.getTerm().getTypeModel().getDeclaration();
        final boolean nat = d.inherits(that.getUnit().getIntegerDeclaration());
        //TODO if it's positive we leave it as is?
        Operators.unaryOp(that, nat?"(+":null, nat?")":null, this);
    }

    @Override public void visit(final Tree.EqualOp that) {
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

                            break;
                        }
                    }
                    _p.setDefaulted(true);
                }
            } else if (tdecl.inherits(sequential)) {
                //Handle Sequence, for nonempty variadic parameters
                _p = new Parameter();
                _p.setModel(new Value());
                _p.getModel().setType(_tuple.getTypeArgumentList().get(0));
                _p.setSequenced(true);
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

                            break;
                        }
                    }
                    gen.out(",", MetamodelGenerator.KEY_DEFAULT,":1");
                }
            } else if (tdecl.inherits(gen.getTypeUtils().sequential)) {
                ProducedType _t2 = _tuple.getSupertype(gen.getTypeUtils().sequential);
                //Handle Sequence, for nonempty variadic parameters
                metamodelTypeNameOrList(gen.getCurrentPackage(), _t2.getTypeArgumentList().get(0), gen);
                gen.out(",seq:1");
                _tuple = gen.getTypeUtils().empty.getType();
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

                pt = pt.resolveAliases(); //needed for aliases like "alias Id<T> => T"
                TypeDeclaration d = getDeclaration(that, pt);
                container = "type '" + d.getName(unit) + "'";
                ClassOrInterface ci =
                        getContainingClassOrInterface(that.getScope());
                if (ci!=null && d.inherits(ci) && !(d instanceof NothingType)) {
                    Declaration direct =
                            ci.getDirectMember(name, signature, ellipsis);
                    if (direct instanceof TypedDeclaration) {
                        member = (TypedDeclaration) direct;
                    }
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

                pt = pt.resolveAliases(); //needed for aliases like "alias Id<T> => T"
                TypeDeclaration d = getDeclaration(that, pt);
                container = "type '" + d.getName(unit) + "'";
                ClassOrInterface ci =
                        getContainingClassOrInterface(that.getScope());
                if (ci!=null && d.inherits(ci) && !(d instanceof NothingType)) {
                    Declaration direct =
                            ci.getDirectMember(name, signature, ellipsis);
                    if (direct instanceof TypeDeclaration) {
                        type = (TypeDeclaration) direct;
                    }
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

    private boolean mixedInBySupertype(TypeDeclaration currentType,
            TypeDeclaration otherType, ClassOrInterface classOrInterface) {
        TypeDeclaration et = classOrInterface.getExtendedTypeDeclaration();
        if (et!=null &&
                et.inherits(currentType) &&
                et.inherits(otherType)) {
            return true;
        }
        for (TypeDeclaration st:
                classOrInterface.getSatisfiedTypeDeclarations()) {
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration.inherits()

    private boolean mixedInBySupertype(TypeDeclaration currentType,
            TypeDeclaration otherType, ClassOrInterface classOrInterface) {
        TypeDeclaration et = classOrInterface.getExtendedTypeDeclaration();
        if (et!=null &&
                et.inherits(currentType) &&
                et.inherits(otherType)) {
            return true;
        }
        for (TypeDeclaration st:
                classOrInterface.getSatisfiedTypeDeclarations()) {
            if (st!=null &&
View Full Code Here

Examples of org.rosuda.REngine.REXP.inherits()

  }

  private static boolean isError(REXP result, SimpleEvaluationObject obj) {
    try {
      REXP value = result.asList().at(0);
      if (value.inherits("try-error")) {
        String prefix = "Error in try({ : ";
        String rs = value.asString();
        if (rs.substring(0, prefix.length()).equals(prefix)) {
          rs = rs.substring(prefix.length());
        }
View Full Code Here

Examples of org.rosuda.REngine.REXP.inherits()

        Logs.log(ret.asString(), R.class);
      }
      else if(!safe)
      {
        ret = rConnection.parseAndEval("try(" + command + ",silent=TRUE)");
        if(ret.inherits("try-error"))
        {
          Logs.log(ret.asString(), Logs.ERROR, R.class);
        }
        else
        {}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.