/** * Creates a 'string' value with the specified content. * * @param text the inner text * @return a value representing that string */ public static Value<String> string(String text) { return Value.ofText(requireNonNull(text)); } }
/** * Sets the value of this model to a new {@link TextValue} holding the * specified {@code String}. * * @param val the new value * @return a reference to this */ default T set(final String val) { return set(ofText(val)); }
/** * 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, String value) { return constant(name, type, ofText(value)); }
/** * Use the specified key-value pair when referencing the annotation. If you * only want to show a single value without any key, consider using the * {@link #set(Value)} method. * <p> * This method works like {@link #put(String, Value)} except that the type * of the value is automatically determined as a {@link TextValue}. * * @param key the key * @param textValue the value * @return a reference to this model * * @since 2.5 */ default AnnotationUsage put(String key, String textValue) { return put(key, Value.ofText(textValue)); }
protected AnnotationUsage generated() { final String owner = infoComponent.getTitle(); return AnnotationUsage.of(GeneratedCode.class).set(Value.ofText(owner)); }
/** * Creates an {@link AnnotationUsage} with the specified {@code Type} and * adds it to this model. This method will also set the {@code value()} * of the annotation to {@code textValue}. * * @param annotation the new annotation usage * @param textValue the value of the text for this annotation * @return a reference to this * * @since 2.5 */ default T annotate(final Type annotation, String textValue) { return annotate(AnnotationUsage.of(annotation).set(ofText(textValue))); }
.add(Value.ofText(constant)) .add(Value.ofNumber(ordinal));
identifierEnum.add(EnumConstant.of(constant).add(Value.ofText(col.getId())));
/** * Creates a 'string' value with the specified content. * * @param text the inner text * @return a value representing that string */ public static Value<String> string(String text) { return Value.ofText(requireNonNull(text)); } }
/** * Creates a 'string' value with the specified content. * * @param text the inner text * @return a value representing that string */ public static Value<String> string(String text) { return Value.ofText(requireNonNull(text)); } }
/** * Sets the value of this model to a new {@link TextValue} holding the * specified {@code String}. * * @param val the new value * @return a reference to this */ default T set(final String val) { return set(ofText(val)); }
/** * 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, String value) { return constant(name, type, ofText(value)); }
/** * Use the specified key-value pair when referencing the annotation. If you * only want to show a single value without any key, consider using the * {@link #set(Value)} method. * <p> * This method works like {@link #put(String, Value)} except that the type * of the value is automatically determined as a {@link TextValue}. * * @param key the key * @param textValue the value * @return a reference to this model * * @since 2.5 */ default AnnotationUsage put(String key, String textValue) { return put(key, Value.ofText(textValue)); }
/** * Creates an {@link AnnotationUsage} with the specified {@code Type} and * adds it to this model. This method will also set the {@code value()} * of the annotation to {@code textValue}. * * @param annotation the new annotation usage * @param textValue the value of the text for this annotation * @return a reference to this * * @since 2.5 */ default T annotate(final Type annotation, String textValue) { return annotate(AnnotationUsage.of(annotation).set(ofText(textValue))); }
identifierEnum.add(EnumConstant.of(constant).add(Value.ofText(col.getId())));