Examples of ArgumentListM


Examples of net.karneim.pojobuilder.model.ArgumentListM

        writer
            .emitStatement("%s result = %s.%s(%s)", pojoTypeDeclaration, factoryClass, factoryMethod.getName(), arguments);
      }
    } else {
      if ( factoryMethod == null) {
        ArgumentListM constructorArguments = properties.filterOutPropertiesWritableViaConstructorParameter(builderType);
        StringBuilder arguments = new StringBuilder();
        for (PropertyM prop : constructorArguments.sortByPosition().getPropertyList()) {
          writer
            .emitStatement("%s _%s = !%s && %s!=null?%s.build():%s",
                writer.compressType(prop.getPropertyType().getGenericTypeDeclaration()),
                prop.getConstructorParameter().getName(),
                prop.getIsSetFieldName(),
                prop.getBuilderFieldName(),
                prop.getBuilderFieldName(),
                prop.getValueFieldName()
              );
          if ( arguments.length()>0) {
            arguments.append(", ");
          }
          arguments.append(String.format("_%s", prop.getConstructorParameter().getName()));
        }
        writer
            .emitStatement("%s result = new %s(%s)", pojoTypeDeclaration, pojoTypeDeclaration, arguments.toString());
      } else {
        ArgumentListM constructorArguments = properties.filterOutPropertiesWritableViaFactoryMethodParameter(builderType);
        StringBuilder arguments = new StringBuilder();
        for (PropertyM prop : constructorArguments.sortByPosition().getPropertyList()) {
          writer
            .emitStatement("%s _%s = !%s && %s!=null?%s.build():%s",
                writer.compressType(prop.getPropertyType().getGenericType()),
                prop.getFactoryMethodParameter().getName(),
                prop.getIsSetFieldName(),
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.