1 package org.simantics.scl.compiler.internal.interpreted;
3 import org.simantics.scl.runtime.function.Function;
6 public class IConstant implements IExpression {
7 private final Object value;
9 public IConstant(Object value) {
14 public Object execute(Object[] variableBindings) {
19 public String toString() {
22 else if(value instanceof Number || value instanceof Function)
23 return value.toString();
24 else if(value instanceof String)
25 return "\"" + value.toString() + "\"";
26 else if(value instanceof Class)
27 return ((Class<?>)value).getSimpleName();
29 return "(" + value.toString() + "::" + value.getClass().getSimpleName() + ")";