![JAR search and dependency download from the Maven repository](/logo.png)
org.snapscript.tree.closure.ClosureFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap Show documentation
Show all versions of snap Show documentation
Dynamic scripting for the JVM
package org.snapscript.tree.closure;
import java.util.List;
import org.snapscript.core.type.Type;
import org.snapscript.core.annotation.Annotation;
import org.snapscript.core.constraint.Constraint;
import org.snapscript.core.convert.proxy.FunctionProxy;
import org.snapscript.core.function.Function;
import org.snapscript.core.function.Invocation;
import org.snapscript.core.function.Signature;
public class ClosureFunction implements Function {
private final Invocation invocation;
private final FunctionProxy proxy;
private final Function template;
public ClosureFunction(Function template, Invocation invocation) {
this.proxy = new FunctionProxy(this);
this.invocation = invocation;
this.template = template;
}
@Override
public int getModifiers() {
return template.getModifiers();
}
@Override
public String getName() {
return template.getName();
}
@Override
public Type getType() {
return template.getType();
}
@Override
public Type getHandle() {
return template.getHandle();
}
@Override
public Signature getSignature() {
return template.getSignature();
}
@Override
public Constraint getConstraint() {
return template.getConstraint();
}
@Override
public List getAnnotations() {
return template.getAnnotations();
}
@Override
public Invocation getInvocation() {
return invocation;
}
@Override
public String getDescription() {
return template.getDescription();
}
@Override
public Object getProxy(Class type) {
return proxy.getProxy(type);
}
@Override
public Object getProxy() {
return proxy.getProxy();
}
@Override
public String toString(){
return String.valueOf(template);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy