property annotations for documentation of formatter properties v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 15 Aug 2015 10:04:28 +0200
branchv_0
changeset 205 d6624c3b146a
parent 204 2805fea90278
child 206 e2f24eea8543
property annotations for documentation of formatter properties
java/sql-dk/src/info/globalcode/sql/dk/configuration/PropertyDeclaration.java
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/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 <http://www.gnu.org/licenses/>.
+ */
+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();
+}
--- /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 <http://www.gnu.org/licenses/>.
+ */
+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();
+
+}