/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage set(Value<?> val) { return copy().set(val); }
/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage set(Type type) { return copy().set(requireNonNull(type)); }
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))); }
private AnnotationUsage withExecuteBefore(File file) { file.add(Import.of(State.class).static_().setStaticMember("RESOLVED")); return AnnotationUsage.of(ExecuteBefore.class).set(Value.ofReference("RESOLVED")); }
/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage set(Type type) { return copy().set(requireNonNull(type)); }
/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage set(Value<?> val) { return copy().set(val); }
/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage set(Type type) { return copy().set(requireNonNull(type)); }
/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage set(Value<?> val) { return copy().set(val); }
/** * 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))); }
private AnnotationUsage withExecuteBefore(File file) { file.add(Import.of(State.class).static_().setStaticMember("RESOLVED")); return AnnotationUsage.of(ExecuteBefore.class).set(Value.ofReference("RESOLVED")); }