public BuilderProperty standardBuilderMethod() { return BuilderProperty.methodBuilder(this) .name() .addParameter() .nullCheckIfNecessary() .assignment() .build(); }
private static PredicateConfiguration ofMode(Mode mode, TypeInfo typeInfo) { PojoInfo pojoInfo = PojoInfo.of(mode, typeInfo); return new PredicateConfiguration( pojoInfo, PojoClass.of(pojoInfo, typeInfo), mode.builderConfiguration(typeInfo)); }
@Override public void onStart(Set<? extends TypeElement> typeElements, RoundEnvironment roundEnv) { PojoInfo.invalidate(); Naming.invalidate(); Property.invalidate(); for (Plugin plugin : pluginList) { plugin.onStart(); } }
private BuilderProperty ofMinute(Property property) { return BuilderProperty.methodBuilder(property) .name() .addParameter(TypeName.INT, "year") .addParameter(TypeName.INT, "month") .addParameter(TypeName.INT, "dayOfMonth") .addParameter(TypeName.INT, "hour") .addParameter(TypeName.INT, "minute") .assignment("$T.of(year, month, dayOfMonth, hour, minute)", LocalDateTime.class) .build(); }
public PojoProperty standardPojoMethod() { return PojoProperty.overridingMethodBuilder(this) .statement("return $L", name()) .build(); }
@Override public Contribution execute() { return Contribution.builder() .addCustomField(typeName, name) .addPojoProperty(property.standardPojoMethod()) .build(); }
@Override public BuilderProperty execute(Property property) { return BuilderProperty.of( property.standardBuilderProperty(), empty(property), of(property), ofNullable(property)); }
public BuilderProperty standardBuilderProperty() { return BuilderProperty.of( new SuperinterfaceBuilderProperty(this), standardBuilderField(), standardBuilderMethod(), standardBuilderGetter()); }
public static RecordingConfiguration of(TypeInfo typeInfo) { PojoInfo pojoInfo = PojoInfo.of(typeInfo); PojoClass pojoClass = PojoClass.of(pojoInfo, typeInfo); return new RecordingConfiguration( pojoInfo, StandardBuilderConfiguration.of(typeInfo), pojoClass); }
@Override PojoProperty standardPojoConstructorStatement(Property property) { return PojoProperty.constructorStatementBuilder(property) .nullCheck() .parameterAssignment() .build(); } };
@Override public BuilderProperty execute(Property property) { return BuilderProperty.of( property.standardBuilderProperty(), ofMinute(property), ofSecond(property)); }
@Override PojoProperty standardPojoConstructorStatement(Property property) { return PojoProperty.constructorStatementBuilder(property) .builderGetAssignment() .build(); } },
@Override public final BuilderProperty execute(Property property) { return BuilderProperty.of( property.standardBuilderProperty(), varargs(property)); }
private BuilderProperty ofSecond(Property property) { return BuilderProperty.methodBuilder(property) .name() .addParameter(TypeName.INT, "year") .addParameter(TypeName.INT, "month") .addParameter(TypeName.INT, "dayOfMonth") .addParameter(TypeName.INT, "hour") .addParameter(TypeName.INT, "minute") .addParameter(TypeName.INT, "second") .assignment("$T.of(year, month, dayOfMonth, hour, minute, second)", LocalDateTime.class) .build(); }
public BuilderProperty standardBuilderMethod() { return BuilderProperty.methodBuilder(this) .name() .addParameter() .nullCheckIfNecessary() .assignment() .build(); }
@Override public BuilderProperty execute(Property property) { return BuilderProperty.of( property.standardBuilderProperty(), empty(property), of(property), ofNullable(property)); }
private BuilderProperty empty(Property property) { return BuilderProperty.methodBuilder(property) .name() .assignment("$T.empty()", Optional.class) .build(); }
private BuilderProperty ofMinute(Property property) { return BuilderProperty.methodBuilder(property) .name() .addParameter(TypeName.INT, "year") .addParameter(TypeName.INT, "month") .addParameter(TypeName.INT, "dayOfMonth") .addParameter(TypeName.INT, "hour") .addParameter(TypeName.INT, "minute") .assignment("$T.of(year, month, dayOfMonth, hour, minute)", LocalDateTime.class) .build(); }
private BuilderProperty empty(Property property) { return BuilderProperty.methodBuilder(property) .name() .assignment("$T.empty()", Optional.class) .build(); }
private BuilderProperty ofSecond(Property property) { return BuilderProperty.methodBuilder(property) .name() .addParameter(TypeName.INT, "year") .addParameter(TypeName.INT, "month") .addParameter(TypeName.INT, "dayOfMonth") .addParameter(TypeName.INT, "hour") .addParameter(TypeName.INT, "minute") .addParameter(TypeName.INT, "second") .assignment("$T.of(year, month, dayOfMonth, hour, minute, second)", LocalDateTime.class) .build(); }