fix #123 allow to specify extra annotations on repositories/methods
[yosql.git] / yosql-codegen / src / main / java / wtf / metio / yosql / codegen / blocks / Annotations.java
blob9b647b859019911faa4fc68bb212d23be5e75f78
1 /*
2 * This file is part of yosql. It is subject to the license terms in the LICENSE file found in the top-level
3 * directory of this distribution and at https://creativecommons.org/publicdomain/zero/1.0/. No part of yosql,
4 * including this file, may be copied, modified, propagated, or distributed except according to the terms contained
5 * in the LICENSE file.
6 */
8 package wtf.metio.yosql.codegen.blocks;
10 import com.squareup.javapoet.AnnotationSpec;
11 import wtf.metio.yosql.models.immutables.SqlConfiguration;
13 /**
14 * Generates annotations for classes, fields, and methods.
16 public interface Annotations {
18 /**
19 * @return Generated annotations for a single class.
21 Iterable<AnnotationSpec> generatedClass();
23 /**
24 * @return Generated annotations for a single field.
26 Iterable<AnnotationSpec> generatedField();
28 /**
29 * @return Generated annotations for a single method.
31 Iterable<AnnotationSpec> generatedMethod();
33 /**
34 * @return User specified annotations for generated repositories and their interfaces.
36 Iterable<AnnotationSpec> generatedRepository();
38 /**
39 * @return User specified annotations for generated methods.
41 Iterable<AnnotationSpec> generatedMethod(SqlConfiguration configuration);
43 /**
44 * @return User specified annotations for generated constructors.
46 Iterable<AnnotationSpec> generatedConstructor();