Examples of Declare


Examples of com.meidusa.amoeba.sqljep.function.Declare

          }else{
            comp.setValue(value);
          }
        }
        if(pfmc instanceof Declare){
          Declare declare = (Declare) pfmc;
          declare.declare(runtime, list);
        }else{
          runtime.stack.push(list);
        }
      }else{
        //分析每个参数是否是 Comparative 类型
        Comparative lastComparative = null;
        for(int i=0;i<parameters.length;i++){
          if(parameters[i] instanceof Comparative){
            lastComparative = ((Comparative) parameters[i]);
            parameters[i] =((Comparative) parameters[i]).getValue();
          }
        }

        Comparable<?> result = pfmc.getResult(parameters);
        if(lastComparative != null){
          lastComparative.setValue(result);
          result = lastComparative;
        }
        if(pfmc instanceof Declare){
          Declare declare = (Declare) pfmc;
          declare.declare(runtime, result);
        }else{
          runtime.stack.push(result);
        }
      }
    }else{
      if(pfmc instanceof Declare){
        Declare declare = (Declare) pfmc;
        declare.declare(runtime, pfmc.getResult(parameters));
      }else{
        runtime.stack.push(pfmc.getResult(parameters));
      }
    }
   
View Full Code Here

Examples of common.model.Declare

    for (int i = 0; i < width; i++) {
      for (int j = 0; j < height; j++) {
        if (i > 0) {
          String label = label(number(i, j), number(i - 1, j));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
        if (j > 0) {
          String label = label(number(i, j), number(i, j - 1));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
        if (i < width - 1) {
          String label = label(number(i, j), number(i + 1, j));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
        if (j < height - 1) {
          String label = label(number(i, j), number(i, j + 1));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
      }
    }
View Full Code Here

Examples of common.model.Declare

        if (!check(i, j))
          continue;
        if (i > 0 && check(i - 1, j)) {
          String label = label(number(i, j), number(i - 1, j));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
        if (j > 0 && check(i, j - 1)) {
          String label = label(number(i, j), number(i, j - 1));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
        if (i < width - 1 && check(i + 1, j)) {
          String label = label(number(i, j), number(i + 1, j));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
        if (j < height - 1 && check(i, j + 1)) {
          String label = label(number(i, j), number(i, j + 1));
          if (!definedVars.contains(label)) {
            statements.add(new Declare(label, Type.Bool));
            definedVars.add(label);
          }
        }
      }
    }
View Full Code Here

Examples of common.model.Declare

    List<Statement> result = new ArrayList<Statement>();

    String varPattern = "var_{0}";
    // Generate variables
    for (int i = 0; i < total; i++) {
      result.add(new Declare(MessageFormat.format(varPattern, i),
          Type.Int));
    }
    // Range Check
    for (int i = 0; i < total; i++) {
      String var = MessageFormat.format(varPattern, i);
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transaction.Declare

    private Binary declare()
    {
        SectionEncoder encoder = _session.getSectionEncoder();


        AmqpValue section = new AmqpValue(new Declare());


        Transfer transfer = new Transfer();
        transfer.setPayload(section.encode(encoder).asByteBuffer());
        transfer.setDeliveryTag(DELIVERY_TAG);
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transaction.Declare

    public Declare construct(Object underlying)
    {
        if(underlying instanceof List)
        {
            List list = (List) underlying;
            Declare obj = new Declare();
            int position = 0;
            final int size = list.size();

            if(position < size)
            {
                Object val = list.get(position);
                position++;

                if(val != null)
                {

                    try
                    {
                        obj.setGlobalId( (GlobalTxId) val );
                    }
                    catch(ClassCastException e)
                    {

                        // TODO Error
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transaction.Declare

    private Binary declare() throws LinkDetachedException
    {
        SectionEncoder encoder = _session.getSectionEncoder();


        AmqpValue section = new AmqpValue(new Declare());


        Transfer transfer = new Transfer();
        transfer.setPayload(section.encode(encoder).asByteBuffer());
        transfer.setDeliveryTag(DELIVERY_TAG);
View Full Code Here

Examples of org.apache.qpid.proton.amqp.transaction.Declare

    public Declare newInstance(Object described)
    {
        List l = (List) described;

        Declare o = new Declare();

        if(!l.isEmpty())
        {
            o.setGlobalId( (GlobalTxId) l.get( 0 ) );
        }

        return o;
    }
View Full Code Here

Examples of org.aspectj.weaver.patterns.Declare

//  }
// 
  public Declare parseDeclare(Parser parser) {
    PatternParser patternParser = new PatternParser(tokenSource);
    try {
      Declare ret = patternParser.parseDeclare();
      checkEof(parser);
      return ret;
    } catch (ParserException pe) {
      reportError(parser, pe);
      return null;
View Full Code Here

Examples of org.aspectj.weaver.patterns.Declare

  }
 
  public Declare parseAnnotationDeclare(Parser parser) {
    PatternParser patternParser = new PatternParser(tokenSource);
    try {
      Declare ret = patternParser.parseDeclareAnnotation();
      checkEof(parser);
      return ret;
    } catch (ParserException pe) {
      reportError(parser, pe);
      return null;
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.