]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/TypedValue.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.reflection / src / org / simantics / scl / reflection / TypedValue.java
diff --git a/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/TypedValue.java b/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/TypedValue.java
new file mode 100755 (executable)
index 0000000..5fcbe17
--- /dev/null
@@ -0,0 +1,30 @@
+package org.simantics.scl.reflection;\r
+\r
+import org.simantics.scl.compiler.types.Type;\r
+\r
+/**\r
+ * SCL together with its type.\r
+ * @author Hannu Niemistö\r
+ */\r
+public class TypedValue {\r
+    final Type type;\r
+    final Object value;\r
+    \r
+    public TypedValue(Type type, Object value) {\r
+        this.type = type;\r
+        this.value = value;\r
+    }\r
+    \r
+    @Override\r
+    public String toString() {\r
+        return value.toString() + " :: " + type;\r
+    }\r
+    \r
+    public Type getType() {\r
+        return type;\r
+    }\r
+    \r
+    public Object getValue() {\r
+        return value;\r
+    }\r
+}
\ No newline at end of file