]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.expressions/src/org/simantics/scl/expressions/EnvironmentDescription.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.expressions / src / org / simantics / scl / expressions / EnvironmentDescription.java
diff --git a/bundles/org.simantics.scl.expressions/src/org/simantics/scl/expressions/EnvironmentDescription.java b/bundles/org.simantics.scl.expressions/src/org/simantics/scl/expressions/EnvironmentDescription.java
new file mode 100644 (file)
index 0000000..0ae0a72
--- /dev/null
@@ -0,0 +1,24 @@
+package org.simantics.scl.expressions;\r
+\r
+/**\r
+ * Describes an environment for evaluating expressions.\r
+ * The description includes the names and types of the\r
+ * environment variables, but not necessarily the values.\r
+ * The values are obtained using the ContextualValues\r
+ * given by successfully resolved variables. \r
+ * @author Hannu Niemistö\r
+ * @param <Context>\r
+ */\r
+public interface EnvironmentDescription<Context> {\r
+    /**\r
+     * Tries to resolve an environment variable\r
+     * with a given name. Returns <code>null</code>\r
+     * if there is no such variable. If variable is\r
+     * found, returns ContextualValue that can be\r
+     * used to obtain the value of the environment \r
+     * variable with a suitable context.\r
+     * @param name\r
+     * @return\r
+     */\r
+    ContextualValue<Context> resolve(String name);\r
+}\r