Examples of arg()


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

    final JMethod generateAdd = cc.implClass.method(JMod.PUBLIC, cc.implClass, "addToCoordinates");
    generateAdd.javadoc().append("add a value to the coordinates property collection");
    final JInvocation returntype = JExpr._new(classCoordinates);
    final JVar arg = generateAdd.param(JMod.FINAL, String.class, field.name());
    generateAdd.javadoc().addParam(arg).append("required parameter");
    returntype.arg(arg);

    generateAdd.javadoc().addReturn().append("<tt>true</tt> (as general contract of <tt>Collection.add</tt>). ");
    generateAdd.body().add(JExpr._this().invoke("getCoordinates").invoke("add").arg(returntype));
    generateAdd.body()._return(JExpr._this());
View Full Code Here

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

    final JInvocation returntype = JExpr._new(classCoordinates);
    for (final JFieldVar field : coordinateCreateMethods) {

      final JVar arg = generateAdd.param(JMod.FINAL, field.type(), field.name());
      generateAdd.javadoc().addParam(arg).append("required parameter");
      returntype.arg(arg);
    }

    generateAdd.javadoc().addReturn().append("<tt>true</tt> (as general contract of <tt>Collection.add</tt>). ");
    generateAdd.body().add(JExpr._this().invoke("getCoordinates").invoke("add").arg(returntype));
    generateAdd.body()._return(JExpr._this());
View Full Code Here

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

      // if (fo.getPropertyInfo().isCollection()) {
      // LOG.info("!!!!! " + cc.implClass.name() + " is collection " + methodName );
      // continue;
      // }
      final JVar arg = m.param(JMod.FINAL, field.type(), field.name());
      args.arg(JExpr.ref(field.name()));
      m.javadoc().addParam(arg).append("required parameter");
      // m.body().assign(JExpr.refthis(field.name()), arg);
    }

    m.body().decl(cClassInfo, localName, args);
View Full Code Here

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

  protected JInvocation createDomainObjectCreationExpression( @Nonnull DomainObjectDescriptor domainObjectDescriptor ) {
    JInvocation invocation = JExpr._new( codeGenerator.ref( domainObjectDescriptor.getQualifiedName() ) );

    ConstructorDeclaration constructor = domainObjectDescriptor.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()

    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()

        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);
        }
       
        return block.decl(type, varName, invocation);
    }
View Full Code Here

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

           
            JMethod nextMethod = builder.getMethod();
           
            JInvocation invocation = JExpr.invoke(nextMethod).arg(xsrVar).arg(rtContextVar);
            for (JVar v : builder.variables) {
                invocation.arg(v);
            }
           
            nextMethod.param(model._ref(String.class), "_attValue");
            invocation.arg(attValue);
           
View Full Code Here

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

            for (JVar v : builder.variables) {
                invocation.arg(v);
            }
           
            nextMethod.param(model._ref(String.class), "_attValue");
            invocation.arg(attValue);
           
            nextMethod.body().add(builder.codeBlock);
           
            if (root && builder.returnType != null) {
                cond._then()._return(invocation);
View Full Code Here

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

            JBlock block = cond._then();
           
            JMethod nextMethod = builder.getMethod();
            JInvocation invocation = JExpr.invoke(nextMethod).arg(xsrVar).arg(rtContextVar);
            for (JExpression var : call.getVars()) {
                invocation.arg(var);
            }
            block.add(invocation);
            if (builder != this)
                builder.write();
        }
View Full Code Here

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

       
        JInvocation invocation = JExpr.invoke(nextMethod).arg(xsrVar).arg(rtContextVar);

        if (!global) {
            for (JVar v : builder.variables) {
                invocation.arg(v);
            }
        }
       
        if (root && builder.returnType != null) {
            block._return(invocation);
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.