java/sql-dk/src/main/java/info/globalcode/sql/dk/configuration/PropertyDeclaration.java
author František Kučera <franta-hg@frantovo.cz>
Thu, 24 Oct 2019 21:43:08 +0200
branchv_0
changeset 250 aae5009bd0af
parent 238 4a1864c3e867
permissions -rw-r--r--
fix license version: GNU GPLv3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
205
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * SQL-DK
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2015 František Kučera (frantovo.cz)
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
250
aae5009bd0af fix license version: GNU GPLv3
František Kučera <franta-hg@frantovo.cz>
parents: 238
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
205
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
package info.globalcode.sql.dk.configuration;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
import java.lang.annotation.ElementType;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
import java.lang.annotation.Repeatable;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
import java.lang.annotation.Retention;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
import static java.lang.annotation.RetentionPolicy.RUNTIME;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
import java.lang.annotation.Target;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
/**
207
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    26
 * Declaration of the (formatter) properties – for documentation purposes.
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    27
 *
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    28
 * TODO: automatically inject properties (configured, ad-hoc, default ones) to the formatters
205
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
 *
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
 * @author Ing. František Kučera (frantovo.cz)
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
@Retention(RUNTIME)
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
@Target({ElementType.TYPE})
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
@Repeatable(PropertyDeclarations.class)
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
public @interface PropertyDeclaration {
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
	/**
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
	 * @return name of the property
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
	 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
	String name();
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
	/**
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
	 * @return data type of the value: String, numbers, Boolean or Enum
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
	 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
	Class type();
212
d154d6012cbe property annotations: first version (inherited properties are not working yet)
František Kučera <franta-hg@frantovo.cz>
parents: 207
diff changeset
    46
	
205
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    47
	/**
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    48
	 * @return documentation for the users
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
	 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
	String description();
207
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    51
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    52
	/**
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    53
	 * @return default value of this property
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    54
	 */
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    55
	String defaultValue();
205
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    56
}