--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.databoard.tests;
+
+import org.simantics.databoard.Datatypes;\r
+import org.simantics.databoard.annotations.Length;\r
+import org.simantics.databoard.annotations.Optional;\r
+import org.simantics.databoard.annotations.Range;\r
+import org.simantics.databoard.annotations.Referable;\r
+import org.simantics.databoard.annotations.Unit;\r
+import org.simantics.databoard.type.Datatype;\r
+
+public @Referable class TestArray {
+
+ @Length("5") int[] a;
+
+ float[][][] b;
+
+ TestArray[] c;
+
+ @Unit("m") double length;
+
+ static class ExampleClass {
+
+ @Length({"320", "240"})
+ int[][] image;
+
+ @Range("[0..100]") double alpha;
+
+ @Optional
+ @Unit("m")
+ double length;
+ }
+
+ public static void main(String[] args) throws Exception {
+ Datatype exampleDataType = Datatypes.getDatatype(ExampleClass.class);
+
+ System.out.println(exampleDataType);
+
+ }
+}