![JAR search and dependency download from the Maven repository](/logo.png)
org.snapscript.tree.constraint.ConstraintReference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap-all Show documentation
Show all versions of snap-all Show documentation
Dynamic scripting for the JVM
package org.snapscript.tree.constraint;
import org.snapscript.core.Scope;
import org.snapscript.core.Type;
import org.snapscript.core.Value;
public class ConstraintReference {
private final Constraint constraint;
public ConstraintReference(Constraint constraint) {
this.constraint = constraint;
}
public Type getConstraint(Scope scope) throws Exception {
if(constraint != null) {
Value value = constraint.evaluate(scope, null);
if(value != null) {
return value.getValue();
}
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy