1 /*******************************************************************************
2 * Copyright (c) 2010 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.databoard.tests;
14 import org.simantics.databoard.Datatypes;
15 import org.simantics.databoard.annotations.Length;
16 import org.simantics.databoard.annotations.Optional;
17 import org.simantics.databoard.annotations.Range;
18 import org.simantics.databoard.annotations.Referable;
19 import org.simantics.databoard.annotations.Unit;
20 import org.simantics.databoard.type.Datatype;
22 public @Referable class TestArray {
30 @Unit("m") double length;
32 static class ExampleClass {
34 @Length({"320", "240"})
37 @Range("[0..100]") double alpha;
44 public static void main(String[] args) throws Exception {
45 Datatype exampleDataType = Datatypes.getDatatype(ExampleClass.class);
47 System.out.println(exampleDataType);