Examples of Value


Examples of org.springframework.beans.factory.annotation.Value

    return parameter.hasParameterAnnotation(Value.class);
  }

  @Override
  protected NamedValueInfo createNamedValueInfo(MethodParameter parameter) {
    Value annotation = parameter.getParameterAnnotation(Value.class);
    return new ExpressionValueNamedValueInfo(annotation);
  }
View Full Code Here

Examples of org.wso2.carbon.mediator.calltemplate.util.Value

            if (!"".equals(paramName)) {
                OMElement paramEl = fac.createOMElement(WITH_PARAM_Q.getLocalPart(),
                                                        synNS);
                paramEl.addAttribute(fac.createOMAttribute("name", nullNS, paramName));
                //serialize value attribute
                Value value = paramsMap.get(paramName);
                new ValueSerializer().serializeValue(value, "value", paramEl);
                invokeElem.addChild(paramEl);
            }
        }
View Full Code Here

Examples of org.xilaew.atg.model.tests.Value

        FunctionCall func = factory.createFunctionCall();
        func.setName(tcgActivity.getName());
        func.setActivity(tcgActivity);
        tc.setFunction(func);
        for (TCGVariable var : tcgActivity.getVariables()) {
          Value v = factory.createValue();
          v.setName(var.getName());
          v.setVariable(var);
          if (var.isIsParameter()) {
            Double value = null;
            try {
              value = ampl.getParameter(var.getName());
            } catch (IOException e) {
             
              e.printStackTrace();
              continue;
            }
            v.setValue(value);
            switch (var.getUsage()) {
            case IN_PARAMETER:
              func.getParameters().add(v);
              break;
            case OUT_PARAMETER:
              tc.getTestForValue().add(v);
              break;
            case INOUT_PARAMETER:
              // XXX INOUT parameters currently can not be handled
              // since there is only one value. For in/out
              // Parameters a pre and a post Value would be
              // necessary.
              // func.getParameters().add(v); //@pre
              // tc.getTestForValue().add(v); //post
              break;
            case RETURN_PARAMETER:
              tc.getTestForValue().add(v);
              break;
            default:
              break;
            }
          } else {
            List<Double> trace = null;
            try {
              trace = ampl.getVariable(var.getName());
            } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
              continue;
            }
            v.setValue(trace.get(0));
            tc.getInitValues().add(v);
            Value vout = factory.createValue();
            vout.setValue(trace.get(trace.size() - 1));
            vout.setName(var.getName());
            vout.setVariable(var);
            tc.getTestForValue().add(vout);
          }
        }
      }
    }
View Full Code Here

Examples of org.yinwang.yin.value.Value

public class Binder {

    public static void define(Node pattern, Value value, Scope env) {
        if (pattern instanceof Name) {
            String id = ((Name) pattern).id;
            Value v = env.lookupLocal(id);
            if (v != null) {
                Util.abort(pattern, "trying to redefine name: " + id);
            } else {
                env.putValue(id, value);
            }
View Full Code Here

Examples of proguard.evaluation.value.Value

    {
        StringBuffer buffer = new StringBuffer();

        for (int index = 0; index < this.size(); index++)
        {
            Value value         = this.values[index];
            Value producerValue = producerVariables.getValue(index);
            buffer = buffer.append('[')
                           .append(producerValue == null ? "empty:" : producerValue.toString())
                           .append(value         == null ? "empty"  : value.toString())
                           .append(']');
        }

        return buffer.toString();
View Full Code Here

Examples of rocket.beans.rebind.value.Value

    context.debug("Constructor parameter values.");

    final List<Value> arguments = bean.getConstructorValues();
    final Iterator<Value> argumentsIterator = arguments.iterator();
    while (argumentsIterator.hasNext()) {
      final Value value = argumentsIterator.next();
      body.addArgument(value);

      if (context.isDebugEnabled()) {
        context.debug(value.toString());
      }
    }

    context.unbranch();

    context.branch();
    context.debug("Matching constructors.");

    final List<Constructor> matchingConstructors = new ArrayList<Constructor>();
    final TypeConstructorsVisitor visitor = new TypeConstructorsVisitor() {

      protected boolean visit(final Constructor constructor) {
        boolean match = false;

        // skip non public constructors
        if (constructor.getVisibility() == Visibility.PUBLIC) {
          final List<ConstructorParameter> constructorParameters = constructor.getParameters();

          // skip the given constructor with different numbers of
          // parameters.
          if (constructorParameters.size() == arguments.size()) {

            match = true;
            final Iterator<Value> valuesIterator = arguments.iterator();
            final Iterator<ConstructorParameter> parametersIterator = constructorParameters.iterator();

            while (valuesIterator.hasNext()) {
              final ConstructorParameter parameter = parametersIterator.next();
              final Value value0 = valuesIterator.next();
              if (false == value0.isCompatibleWith(parameter.getType())) {
                match = false;
              }
            }
          }
        }

        if (match) {
          matchingConstructors.add(constructor);
          context.debug("" + constructor);
        }
        return false;
      }
    };

    final Type beanType = bean.getType();
    visitor.start(beanType);

    if (matchingConstructors.size() == 0) {
      this.throwUnableToFindConstructor(bean);
    }
    if (matchingConstructors.size() > 1) {
      this.throwTooManyConstructors(bean, matchingConstructors);
    }
    context.unbranch();

    final Constructor constructor = (Constructor) matchingConstructors.get(0);
    body.setBean(constructor);

    final Iterator<ConstructorParameter> constructorParameters = constructor.getParameters().iterator();
    final Iterator<Value> valuesIterator = arguments.iterator();
    while (constructorParameters.hasNext()) {
      final ConstructorParameter constructorParameter = constructorParameters.next();
      final Value value = valuesIterator.next();
      value.setPropertyType(constructorParameter.getType());

      this.prepareValue(value);
    }

    if (context.isDebugEnabled()) {
View Full Code Here

Examples of rocks.xmpp.extensions.rpc.model.Value

        rpcManager.setEnabled(true);
        rpcManager.setRpcHandler(new RpcHandler() {
            @Override
            public Value process(Jid requester, String methodName, List<Value> parameters) throws RpcException {
                if (methodName.equals("square")) {
                    return new Value(parameters.get(0).getAsInteger() * parameters.get(0).getAsInteger());
                }
                return null;
            }
        });

        Value result = xmppSession2.getExtensionManager(RpcManager.class).call(ROMEO, "square", new Value(2));
        Assert.assertEquals(result.getAsInteger().intValue(), 4);
    }
View Full Code Here

Examples of ru.snake.spritepacker.writer.expression.value.Value

public class ConstantExpression implements Expression {

  private final Value value;

  public ConstantExpression() {
    this.value = new Value();
  }
View Full Code Here

Examples of sisc.data.Value

    SchemeSitemap sitemap = schemeSitemap(scm);
    StreamPipeline pipeline = sitemap.getStreamPipeline();
    EventPipeline eventPipeline = pipeline.getEventPipeline();

    // Obtain the 'type' attribute
    Value stype = assq(sargs, Symbol.get("type"));
    String type;
    if (!stype.eq(FALSE))
      type = string(pair(stype).cdr);
    else
      type = sitemap.getDefaultGeneratorType();

    // We have a normal generator.

    // Obtain the 'src' attribute
    Value ssrc = assq(sargs, Symbol.get("src"));
    if (ssrc.eq(FALSE))
      throw new RuntimeException("No 'src' attribute specified for 'generate'!");
    String src = string(pair(ssrc).cdr);

    // Obtain the parameters
    Value sparams = assq(sargs, Symbol.get("params"));
    Parameters params = getParameters(sparams);

    //     System.out.println("generate type " + type + ", src " + src
    //                        + " params " + params);
   
View Full Code Here

Examples of soot.Value

                if( !m.isConcrete() ) continue;
                if( !m.hasActiveBody() ) continue;
                for( Iterator sIt = m.getActiveBody().getUnits().iterator(); sIt.hasNext(); ) {
                    final Stmt s = (Stmt) sIt.next();
                    if( s instanceof DefinitionStmt ) {
                        Value lhs = ((DefinitionStmt) s).getLeftOp();
                        VarNode v = null;
                        if( lhs instanceof Local ) {
                            v = pag.findLocalVarNode( lhs );
                        } else if( lhs instanceof FieldRef ) {
                            v = pag.findGlobalVarNode( ((FieldRef) lhs).getField() );
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.