Examples of cast()


Examples of kodkod.ast.IntExpression.cast()

  public Expression visit(IntToExprCast castExpr) {
    Expression ret = lookup(castExpr);
    if (ret!=null) return ret;

    final IntExpression intExpr = castExpr.intExpr().accept(this);
    ret = (intExpr==castExpr.intExpr()) ? castExpr : intExpr.cast(castExpr.op());
    return cache(castExpr, ret);
  }
 
    /**
   * Calls lookup(intconst) and returns the cached value, if any. 
View Full Code Here

Examples of limelight.model.api.Player.cast()

  public void playerCanAddEvents() throws Exception
  {
    final Document doc = Xml.stringToDoc("<player class='SamplePlayer'><onMouseClicked>sampleAction</onMouseClicked></player>");
    final Player player = new JavaPlayer("foo", "/testProduction/aScene/players/foo.xml", samplePlayerClass, doc.getDocumentElement(), "limelight.ui.events.panel.");

    Object playerObj = player.cast(prop);

    assertEquals("SamplePlayer", playerObj.getClass().getName());
    assertEquals(1, prop.getEventHandler().getActions(MouseClickedEvent.class).size());
    new MouseClickedEvent(0, null, 1).dispatch(prop);
    assertEquals(1, samplePlayerClass.getField("invocations").get(lastSamplePlayer()));
View Full Code Here

Examples of lombok.val.cast()

  private static <TSource, TDest> void castThrow(TSource[] values, ReifiedList<TDest> list)
  {
    val destinationClass = list.getGenericTypeParameter();
    for (TSource v : values)
    {
      TDest castVal = (TDest) destinationClass.cast(v);
      list.add(castVal);
    }
  }

  /**
 
View Full Code Here

Examples of mage.cards.Card.cast()

        Card card = game.getCard(ability.getSourceId());
        if (card != null) {
            if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), ability.getSourceId(), playerId))) {
                int bookmark = game.bookmarkState();
                Zone fromZone = game.getState().getZone(card.getId());
                card.cast(game, fromZone, ability, playerId);
                Spell spell = game.getStack().getSpell(ability.getId());
                // some effects set sourceId to cast without paying mana costs
                if (ability.getSourceId().equals(getCastSourceIdWithoutMana())) {
                    noMana = true;
                }
View Full Code Here

Examples of mage.players.Player.cast()

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Card target = (Card) game.getObject(source.getFirstTarget());
    return controller.cast(target.getSpellAbility(), game, true);
  }

  @Override
  public String getText(Ability source) {
    return "you may put " + source.getTargets().get(0).getTargetName() + " from your hand onto the battlefield";
View Full Code Here

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.cast()

        cb.getField(field); // instance
        cb.push(index + 1); // first arg;

        rc.generateExpression(acb, cb);
        cb.cast(ClassName.DataValueDescriptor); // second arg
        cb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
        continue;
      }

      userExprFun.getField(field); // instance
View Full Code Here

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.cast()

            userExprFun.dup();       // instance (current row)
            userExprFun.push(i + 1); // arg1

            rc.generateExpression(ecb, userExprFun);
            userExprFun.cast(ClassName.DataValueDescriptor);
               
            userExprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
        }

    /* generates:
 
View Full Code Here

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.cast()

            userExprFun.dup();       // instance (current row)
            userExprFun.push(i + 1); // arg1

            rc.generateExpression(ecb, userExprFun);
            userExprFun.cast(ClassName.DataValueDescriptor);
               
            userExprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
        }

    /* generates:
 
View Full Code Here

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.cast()

            userExprFun.getField(field); // instance
            userExprFun.push(i + 1); // arg1

            rc.generateExpression(ecb, userExprFun);
            userExprFun.cast(ClassName.DataValueDescriptor);
               
            userExprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
        }

    /* generates:
 
View Full Code Here

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.cast()

        cb.getField(field); // instance
        cb.push(index + 1); // first arg;

        rc.generateExpression(acb, cb);
        cb.cast(ClassName.DataValueDescriptor); // second arg
        cb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
        continue;
      }

      userExprFun.getField(field); // instance
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.