# HG changeset patch # User František Kučera # Date 1439625868 -7200 # Node ID d6624c3b146a7bfff6d971edf9143bdfa8a15e34 # Parent 2805fea9027856df69b39f2f385755f87fef3a48 property annotations for documentation of formatter properties diff -r 2805fea90278 -r d6624c3b146a java/sql-dk/src/info/globalcode/sql/dk/configuration/PropertyDeclaration.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/PropertyDeclaration.java Sat Aug 15 10:04:28 2015 +0200 @@ -0,0 +1,49 @@ +/** + * SQL-DK + * Copyright © 2015 František Kučera (frantovo.cz) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package info.globalcode.sql.dk.configuration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Repeatable; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +@Retention(RUNTIME) +@Target({ElementType.TYPE}) +@Repeatable(PropertyDeclarations.class) +public @interface PropertyDeclaration { + + /** + * @return name of the property + */ + String name(); + + /** + * @return data type of the value: String, numbers, Boolean or Enum + */ + Class type(); + + /** + * @return documentation for the users + */ + String description(); +} diff -r 2805fea90278 -r d6624c3b146a java/sql-dk/src/info/globalcode/sql/dk/configuration/PropertyDeclarations.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/PropertyDeclarations.java Sat Aug 15 10:04:28 2015 +0200 @@ -0,0 +1,35 @@ +/** + * SQL-DK + * Copyright © 2015 František Kučera (frantovo.cz) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package info.globalcode.sql.dk.configuration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +@Retention(RUNTIME) +@Target({ElementType.TYPE}) +public @interface PropertyDeclarations { + + PropertyDeclaration[] value(); + +}