Examples of UnsupportedOperation


Examples of com.abiquo.hypervisor.plugin.UnsupportedOperation

    {
        for (Method m : plugin.getClass().getMethods())
        {
            if (!m.isSynthetic() && !m.isBridge())
            {
                UnsupportedOperation uns = m.getAnnotation(UnsupportedOperation.class);
                if (uns != null)
                {
                    builder.put(m.getName(), new UnsupportedOp(uns.types(), uns.regions()));
                }
            }
        }
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

          path = parent;
        }
        uriPartChanged = true;
      }
      else if (name.equals("ls")) {
        throw new UnsupportedOperation("can not update the children of a location", ctx.getCurrentAST());
      }
      else if (name.equals("extension")) {
        if (!replType.isString()) {
          throw new UnexpectedType(getTypeFactory().stringType(), replType, ctx.getCurrentAST());
        }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

     
      if (onType.isAbstractData() || onType.isConstructor() || onType.isNode()) {
        __eval.getCurrentModuleEnvironment().declareAnnotation(onType,
            name, annoType);
      } else {
        throw new UnsupportedOperation("Can only declare annotations on node and ADT types",getOnType());
      }

      return org.rascalmpl.interpreter.result.ResultFactory.nothing();
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

    return ResultFactory.bool(getValue().has(Names.name(name)), ctx);
  }
 
  @Override
  public Result<IValue> call(Type[] argTypes, IValue[] argValues, Map<String, IValue> keyArgValues) {
    throw new UnsupportedOperation("Can not call a constructed " + getType() + " node as a function", ctx.getCurrentAST());
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

        Type type = arg.getType().typeOf(env, true, eval.getEvaluator());
        type = type.instantiate(env.getTypeBindings());
       
        // TODO: Question, should we allow non terminal types in splices?
        if (type instanceof NonTerminalType) {
          throw new UnsupportedOperation("splicing match", type, this);
//          throw new ImplementationError(null);
        }       
        return new TypedMultiVariablePattern(eval, this, type, arg.getName());
      }
      if(arg.hasQualifiedName()){
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

  }
 
  // Error aux methods
 
  protected <U extends IValue> Result<U> undefinedError(String operator) {
    throw new UnsupportedOperation(operator, getType(), ctx.getCurrentAST());
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

  protected <U extends IValue> Result<U> undefinedError(String operator) {
    throw new UnsupportedOperation(operator, getType(), ctx.getCurrentAST());
  }
 
  protected <U extends IValue> Result<U> undefinedError(String operator, Result<?> arg) {
    throw new UnsupportedOperation(operator, getType(), arg.getType(), ctx.getCurrentAST());
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

  }
 
  ///////
 
  public Result<IValue> call(Type[] argTypes, IValue[] argValues, Map<String, IValue> keyArgValues) throws MatchFailed {
    throw new UnsupportedOperation("A value of type " + getType() + " is not something you can call like a function, a constructor or a closure.", ctx.getCurrentAST());
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

    public  <U extends IValue> Result<U> transitiveClosure() {
      if (getValue().asRelation().arity() == 0 || getValue().asRelation().arity() == 2) {
        try {
          return makeResult(type, getValue().asRelation().closure(), ctx);
        } catch (IllegalOperationException e){
          throw new UnsupportedOperation("Illegal argument of transitive closure (+)", ctx.getCurrentAST());
        }
      }
      throw new Arity(2, getValue().asRelation().arity(), ctx.getCurrentAST());
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

    public  <U extends IValue> Result<U> transitiveReflexiveClosure() {
      if (getValue().asRelation().arity() == 0 || getValue().asRelation().arity() == 2) {
        try {
          return makeResult(type, getValue().asRelation().closureStar(), ctx);
        } catch (IllegalOperationException e){
          throw new UnsupportedOperation("Illegal argument of reflexive transitive closure (*)", ctx.getCurrentAST());
        }
      }
      throw new Arity(2, getValue().asRelation().arity(), ctx.getCurrentAST());
    }
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.