Package net.karneim.pojobuilder.model

Examples of net.karneim.pojobuilder.model.MethodM


        .accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)).declaredIn(pojoType))
        .withMethodNamePattern("with*"),
      new PropertyM("someChar", PrimitiveTypeM.CHAR)
        .accessibleVia(new FieldAccessM(EnumSet.of(PRIVATE)).declaredIn(pojoType))
        .writableVia(new SetterMethodM("setSomeChar", EnumSet.of(PUBLIC)).declaredIn(pojoType))
        .readableVia(new MethodM("getSomeChar", EnumSet.of(PUBLIC)).declaredIn(pojoType))
        .withMethodNamePattern("with*"),
      new PropertyM("someString", new TypeM("java.lang","String"))
        .accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
        .writableVia(new SetterMethodM("setSomeString", EnumSet.of(PUBLIC)).declaredIn(pojoType))
        .readableVia(new MethodM("getSomeString", EnumSet.of(PUBLIC)).declaredIn(pojoType))
        .withMethodNamePattern("with*")
    ));       
    builder.setType(new TypeM("com.example.output","SampleBuilder"));
    builder.setSelfType(builder.getType());
    builder.setCopyMethod(new CopyMethodM("copy"));
View Full Code Here


        TypeMirror propertyTypeMirror = execType.getReturnType();
        TypeM propertyType = typeMFactory.getTypeM(propertyTypeMirror);

        PropertyM prop = output.getBuilderModel().getProperties().get(propertyName, propertyType);
        if (prop != null) {
          prop.readableVia(new MethodM(methodEl.getSimpleName().toString(), methodEl.getModifiers())
              .declaredIn(typeMFactory.getTypeM(input.getPojoType())));
        }
        output.getInput().getOrginatingElements().add(javaModelAnalyzerUtil.getCompilationUnit(methodEl));
      }
    }
View Full Code Here

TOP

Related Classes of net.karneim.pojobuilder.model.MethodM

Copyright © 2018 www.massapicom. 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.