/** * Sets all method parameters in the specified model to <code>final</code>. * * @param model the model to operate on */ @Override public void accept(T model) { requireNonNull(model).getMethods() .forEach(m -> m.getFields() .forEach(f -> f.final_()) ); } }
/** * Creates a {@link Field} and adds it to this model. The field will be * given the default modifiers for this type, for an example, a * {@link Class} will be {@code public final}. * * @param name the name of the field * @param type the type of the field * @return a reference to this * * @since 2.5 */ default T field(final String name, Type type) { return add(Field.of(name, type).public_().final_()); }
/** * Creates a public final static {@link Field} with the specified value and * adds it to this model. * * @param name the name of the field * @param type the type of the field * @param value the value of the field * @return a reference to this * * @since 2.5 */ default T constant(final String name, Type type, Value<?> value) { return add(Field.of(name, type) .public_().final_().static_() .set(value) ); }
.private_().final_().static_();
)) .add(getSupport().generatedManagerType()) .add(Field.of("tableIdentifier", SimpleParameterizedType.create(TableIdentifier.class, getSupport().entityType())).private_().final_()) .add(Constructor.of().protected_() .add("this.tableIdentifier = " + TableIdentifier.class.getSimpleName() + ".of("
.add(Field.of("tableIdentifier", tableIdentifierType).private_().final_())
/** * Sets all method parameters in the specified model to <code>final</code>. * * @param model the model to operate on */ @Override public void accept(T model) { requireNonNull(model).getMethods() .forEach(m -> m.getFields() .forEach(f -> f.final_()) ); } }
/** * Sets all method parameters in the specified model to <code>final</code>. * * @param model the model to operate on */ @Override public void accept(T model) { requireNonNull(model).getMethods() .forEach(m -> m.getFields() .forEach(f -> f.final_()) ); } }
/** * Creates a {@link Field} and adds it to this model. The field will be * given the default modifiers for this type, for an example, a * {@link Class} will be {@code public final}. * * @param name the name of the field * @param type the type of the field * @return a reference to this * * @since 2.5 */ default T field(final String name, Type type) { return add(Field.of(name, type).public_().final_()); }
/** * Creates a public final static {@link Field} with the specified value and * adds it to this model. * * @param name the name of the field * @param type the type of the field * @param value the value of the field * @return a reference to this * * @since 2.5 */ default T constant(final String name, Type type, Value<?> value) { return add(Field.of(name, type) .public_().final_().static_() .set(value) ); }
.private_().final_().static_();
.add(Field.of("tableIdentifier", tableIdentifierType).private_().final_())
)) .add(getSupport().generatedManagerType()) .add(Field.of("tableIdentifier", SimpleParameterizedType.create(TableIdentifier.class, getSupport().entityType())).private_().final_()) .add(Constructor.of().protected_() .add("this.tableIdentifier = " + TableIdentifier.class.getSimpleName() + ".of("