]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.expressions/src/org/simantics/scl/expressions/ContextualValue.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.expressions / src / org / simantics / scl / expressions / ContextualValue.java
1 package org.simantics.scl.expressions;
2
3 import org.simantics.scl.compiler.types.Type;
4
5 /**
6  * A value that depends on some context. For example SCL expression
7  * can be compiled into contextual value where the actual value
8  * depends on the free variables of the expression.
9  * @author Hannu Niemistö
10  * @param <Context>
11  */
12 public interface ContextualValue<Context> {
13     /**
14      * SCL type of the value.
15      * @return
16      */
17     Type getType();
18     
19     /**
20      * Evaluates the value in the given context.
21      * @param context
22      * @return
23      */
24     Object getValue(Context context);
25 }