![JAR search and dependency download from the Maven repository](/logo.png)
org.snapscript.bridge.standard.MethodProxyInvocation 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.bridge.standard;
import org.snapscript.cglib.proxy.MethodProxy;
import org.snapscript.core.InternalStateException;
import org.snapscript.core.Result;
import org.snapscript.core.ResultType;
import org.snapscript.core.Scope;
import org.snapscript.core.function.Invocation;
public class MethodProxyInvocation implements Invocation {
private final MethodProxy proxy;
public MethodProxyInvocation(MethodProxy proxy) {
this.proxy = proxy;
}
@Override
public Result invoke(Scope scope, Object value, Object... arguments) {
try {
Object result = proxy.invokeSuper(value, arguments);
return ResultType.getNormal(result);
}catch(Throwable e) {
throw new InternalStateException("Could not invoke super", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy