java/sql-dk/src/main/java/info/globalcode/sql/dk/configuration/PropertyDeclaration.java
author František Kučera <franta-hg@frantovo.cz>
Mon, 04 Mar 2019 20:15:24 +0100
branchv_0
changeset 238 4a1864c3e867
parent 212 java/sql-dk/src/info/globalcode/sql/dk/configuration/PropertyDeclaration.java@d154d6012cbe
child 250 aae5009bd0af
permissions -rw-r--r--
mavenized: sql-dk
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
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, either version 3 of the License, or
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 * (at your option) any later version.
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 *
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * 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
    11
 * 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
    12
 * 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
    13
 * 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
    14
 *
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * 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
    16
 * 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
    17
 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
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
    19
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
import java.lang.annotation.ElementType;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
import java.lang.annotation.Repeatable;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
import java.lang.annotation.Retention;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
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
    24
import java.lang.annotation.Target;
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
/**
207
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    27
 * 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
    28
 *
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    29
 * 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
    30
 *
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
 * @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
    32
 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
@Retention(RUNTIME)
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
@Target({ElementType.TYPE})
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
@Repeatable(PropertyDeclarations.class)
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
public @interface PropertyDeclaration {
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
	/**
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
	 * @return name of the property
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
	 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
	String name();
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
	/**
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
	 * @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
    45
	 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
	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
    47
	
205
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    48
	/**
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
	 * @return documentation for the users
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
	 */
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    51
	String description();
207
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
	/**
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    54
	 * @return default value of this property
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    55
	 */
2bba68ef47c1 property annotations: default values
František Kučera <franta-hg@frantovo.cz>
parents: 205
diff changeset
    56
	String defaultValue();
205
d6624c3b146a property annotations for documentation of formatter properties
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    57
}