Examples of Variable


Examples of org.eclipse.php.internal.core.ast.nodes.Variable

  {
    ArrayList<Expression> parameters = new ArrayList<Expression>();
   
    for(ParameterInfo parameter : fExtractedMethodParameters)
    {
      Variable variable = ast.newVariable(parameter.getParameterName());
     
      parameters.add(variable);
    }
     
    return parameters;
View Full Code Here

Examples of org.eclipse.xtend.expression.Variable

  public Generator() {
    preprocessor = loader.getPreprocessor();

    // Default values
    globalVarsMap.put("StubHppSuffix", new Variable("StubHppSuffix",
        stubHppSuffix));
    globalVarsMap.put("StubCppSuffix", new Variable("StubCppSuffix",
        stubCppSuffix));
    globalVarsMap.put("SkelHppSuffix", new Variable("SkelHppSuffix",
        skelHppSuffix));
    globalVarsMap.put("SkelCppSuffix", new Variable("SkelCppSuffix",
        skelCppSuffix));
    globalVarsMap.put("SkelImplHppSuffix", new Variable(
        "SkelImplHppSuffix", skelImplHppSuffix));
    globalVarsMap.put("SkelImplCppSuffix", new Variable(
        "SkelImplCppSuffix", skelImplCppSuffix));
  }
View Full Code Here

Examples of org.exist.xquery.Variable

        // directly stream the backup contents to the HTTP response
        final ResponseModule myModule = (ResponseModule)context.getModule( ResponseModule.NAMESPACE_URI );

        // response object is read from global variable $response
        final Variable       respVar  = myModule.resolveVariable( ResponseModule.RESPONSE_VAR );

        if( respVar == null ) {
            throw( new XPathException( this, "No response object found in the current XQuery context." ) );
        }

        if( respVar.getValue().getItemType() != Type.JAVA_OBJECT ) {
            throw( new XPathException( this, "Variable $response is not bound to an Java object." ) );
        }
        final JavaObjectValue respValue = (JavaObjectValue)respVar.getValue().itemAt( 0 );

        if( !"org.exist.http.servlets.HttpResponseWrapper".equals( respValue.getObject().getClass().getName() ) ) {
            throw( new XPathException( this, signature.toString() + " can only be used within the EXistServlet or XQueryServlet" ) );
        }
        final ResponseWrapper response = (ResponseWrapper)respValue.getObject();
View Full Code Here

Examples of org.h2.expression.Variable

    private Expression readTerm() {
        Expression r;
        switch (currentTokenType) {
        case AT:
            read();
            r = new Variable(session, readAliasIdentifier());
            if (readIf(":=")) {
                Expression value = readExpression();
                Function function = Function.getFunction(database, "SET");
                function.setParameter(0, r);
                function.setParameter(1, value);
View Full Code Here

Examples of org.jboss.dna.sequencer.java.metadata.Variable

     */
    @SuppressWarnings( "unchecked" )
    private FieldMetadata processVariableDeclaration( SingleVariableDeclaration singleVariableDeclaration,
                                                      Type type ) {

        Variable variable;
        if (type.isPrimitiveType()) {
            PrimitiveFieldMetadata primitiveFieldMetadata = new PrimitiveFieldMetadata();
            primitiveFieldMetadata.setType(((PrimitiveType)type).getPrimitiveTypeCode().toString());
            variable = new Variable();
            variable.setName(JavaMetadataUtil.getName(singleVariableDeclaration.getName()));
            primitiveFieldMetadata.getVariables().add(variable);
            for (IExtendedModifier extendedModifier : (List<IExtendedModifier>)singleVariableDeclaration.modifiers()) {
                ModifierMetadata modifierMetadata = new ModifierMetadata();
                if (extendedModifier.isAnnotation()) {
                    // TODO
                } else {
                    Modifier modifier = (Modifier)extendedModifier;
                    modifierMetadata.setName(modifier.getKeyword().toString());
                    primitiveFieldMetadata.getModifiers().add(modifierMetadata);
                }
            }
            return primitiveFieldMetadata;
        }
        if(type.isSimpleType()) {
            SimpleType simpleType = (SimpleType)type;
            SimpleTypeFieldMetadata simpleTypeFieldMetadata = new SimpleTypeFieldMetadata();
            simpleTypeFieldMetadata.setType(JavaMetadataUtil.getName(simpleType.getName()));
            variable = new Variable();
            variable.setName(JavaMetadataUtil.getName(singleVariableDeclaration.getName()));
            simpleTypeFieldMetadata.getVariables().add(variable);
            for (IExtendedModifier simpleTypeExtendedModifier : (List<IExtendedModifier> )singleVariableDeclaration.modifiers()) {
                ModifierMetadata modifierMetadata = new ModifierMetadata();
                if (simpleTypeExtendedModifier.isAnnotation()) {
                    // TODO
                } else {
                    Modifier modifier = (Modifier)simpleTypeExtendedModifier;
                    modifierMetadata.setName(modifier.getKeyword().toString());
                    simpleTypeFieldMetadata.getModifiers().add(modifierMetadata);
                }
            }
            return simpleTypeFieldMetadata;
        }
        if (type.isParameterizedType()) {
            ParameterizedTypeFieldMetadata parameterizedTypeFieldMetadata = new ParameterizedTypeFieldMetadata();
            ParameterizedType parameterizedType = (ParameterizedType)type;
            parameterizedTypeFieldMetadata.setType(getTypeName(parameterizedType));
            variable = new Variable();
            variable.setName(JavaMetadataUtil.getName(singleVariableDeclaration.getName()));
            parameterizedTypeFieldMetadata.getVariables().add(variable);
            for (IExtendedModifier parameterizedExtendedModifier : (List<IExtendedModifier>)singleVariableDeclaration.modifiers()) {
                ModifierMetadata modifierMetadata = new ModifierMetadata();
                if(parameterizedExtendedModifier.isAnnotation()) {
                    // TODO
                } else {
                    Modifier modifier = (Modifier)parameterizedExtendedModifier;
                    modifierMetadata.setName(modifier.getKeyword().toString());
                    parameterizedTypeFieldMetadata.getModifiers().add(modifierMetadata);
                }
            }
            return parameterizedTypeFieldMetadata;
        }
        if(type.isArrayType()) {
            ArrayTypeFieldMetadata arrayTypeFieldMetadata = new ArrayTypeFieldMetadata();
            ArrayType arrayType = (ArrayType)type;
            arrayTypeFieldMetadata.setType(getTypeName(arrayType));
            variable = new Variable();
            variable.setName(JavaMetadataUtil.getName(singleVariableDeclaration.getName()));
            arrayTypeFieldMetadata.getVariables().add(variable);
           
            for (IExtendedModifier arrayTypeExtendedModifier : (List<IExtendedModifier>)singleVariableDeclaration.modifiers()) {
                ModifierMetadata modifierMetadata = new ModifierMetadata();
                if(arrayTypeExtendedModifier.isAnnotation()) {
View Full Code Here

Examples of org.jboss.errai.codegen.Variable

  public static Statement generate(final Context context, final Object o) {
    if (o instanceof VariableReference) {
      return context.getVariable(((VariableReference) o).getName());
    }
    else if (o instanceof Variable) {
      final Variable v = (Variable) o;
      if (context.isScoped(v)) {
        return v.getReference();
      }
      else {
        if (context.isPermissiveMode()) {
          return v.getReference();
        }
        else {
          throw new OutOfScopeException("variable cannot be referenced from this scope: " + v.getName());
        }
      }
    }
    else if (o instanceof Statement) {
      ((Statement) o).generate(context);
View Full Code Here

Examples of org.jboss.errai.codegen.framework.Variable

    };
  }

  @Override
  public StatementBuilder declareVariable(String name, Class<?> type) {
    Variable v = Variable.create(name, type);
    return declareVariable(v);
  }
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.codegen.Variable

    appendCallElement(new DeferredCallElement(new DeferredCallback() {
      @Override
      public void doDeferred(CallWriter writer, Context context, Statement statement) {
        GenUtil.assertIsIterable(statement);
        Variable loopVar = createForEachLoopVar(statement, loopVarName, loopVarType);
        String collection = writer.getCallString();
        writer.reset();
        writer.append(new ForeachLoop(loopVar, collection, body).generate(Context.create(context)));
      }
    }));
View Full Code Here

Examples of org.jbpm.process.core.context.variable.Variable

        globals.put("name1", "type1");
        globals.put("name2", "type2");
        process.setGlobals(globals);
       
        List<Variable> variables = new ArrayList<Variable>();
        Variable variable = new Variable();
        variable.setName("variable1");
        variable.setType(new StringDataType());
        variable.setValue("value");
        variables.add(variable);
        variable = new Variable();
        variable.setName("variable2");
        variable.setType(new IntegerDataType());
        variable.setValue(2);
        variables.add(variable);
        variable = new Variable();
        variable.setName("variable3");
        variable.setType(new ObjectDataType("org.jbpm.Person"));
        Person person = new Person();
        person.setName("John");
        variable.setValue(person);
        variables.add(variable);       
        variable = new Variable();
        variable.setName("variable4");
        ListDataType listDataType = new ListDataType();
        listDataType.setType(new ObjectDataType("java.lang.Integer"));
        variable.setType(listDataType);
        List<Integer> list = new ArrayList<Integer>();
        list.add(10);
        list.add(20);
        variable.setValue(list);
        variables.add(variable);
        process.getVariableScope().setVariables(variables);
       
        Swimlane swimlane = new Swimlane();
        swimlane.setName("actor1");
View Full Code Here

Examples of org.jbpm.pvm.internal.type.Variable

  public void createSystemVariable(String key, Object value) {
    createSystemVariable(key, value, null);
  }

  public void createSystemVariable(String key, Object value, String typeName) {
    Variable variable = createVariableObject(key, value, typeName, false);
    systemVariables.put(variable.getKey(), variable);
  }
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.