Examples of arg()


Examples of com.sun.codemodel.JInvocation.arg()

  protected JInvocation createDomainObjectCreationExpression() {
    JInvocation invocation = JExpr._new( codeGenerator.ref( descriptor.getQualifiedName() ) );

    ConstructorDeclaration constructor = descriptor.findBestConstructor();
    for ( ParameterDeclaration parameterDeclaration : constructor.getParameters() ) {
      invocation.arg( codeGenerator.getNewInstanceFactory().create( parameterDeclaration.getType(), parameterDeclaration.getSimpleName() ) );
    }

    return invocation;
  }
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

  private void createConstructor( @NotNull JDefinedClass parent ) {
    JMethod constructor = parent.constructor( JMod.PUBLIC );
    JInvocation superInvocation = constructor.body().invoke( SUPER ).arg( jaxbObject.dotclass() ).arg( jaxbStub.dotclass() );

    if ( parent == jaxbTestClass ) {
      superInvocation.arg( jaxbCollection.dotclass() );
    }
  }

  private void createDataPoint( @NotNull @NonNls String identifier, @NotNull JClass objectType ) {
    JMethod method = createDataPointMethod( identifier, objectType );
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

          if (blocksInMethod > MAX_BLOCKS_IN_FUNCTION) {
            JMethod inner = clazz.method(JMod.PRIVATE, model._ref(method.getReturnType()), method.getMethodName() + methodIndex);
            JInvocation methodCall = JExpr.invoke(inner);
            for(CodeGeneratorArgument arg : method){
              inner.param(arg.getType(), arg.getName());
              methodCall.arg(JExpr.direct(arg.getName()));
            }
            for(Class<?> c : method.getThrowsIterable()){
              inner._throws(model.ref(c));
            }
            inner._throws(SchemaChangeException.class);
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

    for(int i =0; i < workspaceJVars.length; i++){
      //sub.assign(workspaceJVars[i], JExpr._new(g.getHolderType(workspaceVars[i].majorType)));
      //Access workspaceVar through workspace vector.        
      JInvocation getValueAccessor = g.getWorkspaceVectors().get(workspaceVars[i]).invoke("getAccessor").invoke("get");         
      if (Types.usesHolderForGet(workspaceVars[i].majorType)) {
        sub.add(getValueAccessor.arg(wsIndexVariable).arg(workspaceJVars[i]));
      } else {
        sub.assign(workspaceJVars[i].ref("value"), getValueAccessor.arg(wsIndexVariable));
      }
      internalVars[i] = sub.decl(g.getHolderType(workspaceVars[i].majorType),  workspaceVars[i].name, workspaceJVars[i]);                   
    }
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

      //Access workspaceVar through workspace vector.        
      JInvocation getValueAccessor = g.getWorkspaceVectors().get(workspaceVars[i]).invoke("getAccessor").invoke("get");         
      if (Types.usesHolderForGet(workspaceVars[i].majorType)) {
        sub.add(getValueAccessor.arg(wsIndexVariable).arg(workspaceJVars[i]));
      } else {
        sub.assign(workspaceJVars[i].ref("value"), getValueAccessor.arg(wsIndexVariable));
      }
      internalVars[i] = sub.decl(g.getHolderType(workspaceVars[i].majorType),  workspaceVars[i].name, workspaceJVars[i]);                   
    }
   
    Preconditions.checkNotNull(body);
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

       
        JMethod nextMethod = b.getMethod();
       
        JInvocation invocation = JExpr.invoke(nextMethod).arg(xsrVar).arg(rtContextVar);
        for (JVar v : b.variables) {
            invocation.arg(v);
        }
       
        block.add(invocation);
       
        return b;
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

        ElementParserBuilderImpl b = (ElementParserBuilderImpl) builder;
        JMethod nextMethod = b.getMethod();
       
        JInvocation invocation = JExpr.invoke(nextMethod).arg(xsrVar).arg(rtContextVar);
        for (JVar v : b.variables) {
            invocation.arg(v);
        }

        varName = variableManager.createId(varName);
        return block.decl(type, varName, invocation);
    }
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

            // Global reader methods don't have arguments
            if (vars == null) vars = builder.getVariables();
            if (vars != null) {
                for (JExpression var : vars) {
                    invocation.arg(var);
                }
            }

            if (readBlock != null) {
                if (expected.getReadVar() != null) {
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

    JInvocation domainTypeInit = JExpr._new( domainType );

    //Add the arguments for the fields
    List<? extends FieldInitializedInConstructorInfo> fieldsToSerialize = domainObjectDescriptor.getFieldsInitializedInConstructor();
    for ( FieldInitializedInConstructorInfo fieldInfo : fieldsToSerialize ) {
      domainTypeInit.arg( fieldToVar.get( fieldInfo ) );
    }

    //Add the object type
    JVar domainObjectVar = deserializeMethod.body().decl( domainType, VAR_NAME_OBJECT, domainTypeInit );
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

            JExpression test;
            JConditional jc;
            JInvocation invocation;
                           
            invocation = JExpr.invoke("tryOverwrite");
            invocation.arg(JExpr.dotclass(type.boxify()));
            invocation.arg(JExpr.lit(fieldName));
            JVar tmp = method.body().decl(type.boxify(), "_" + fieldName,
                                          invocation);
            test = JOp.not(JOp.eq(JExpr._null(), tmp));
            jc = method.body()._if(test);
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.