org.jruby.truffle.interop.RubyMessageResolutionForeign Maven / Gradle / Ivy
The newest version!
package org.jruby.truffle.interop;
import com.oracle.truffle.api.interop.ForeignAccess.Factory18;
import com.oracle.truffle.api.interop.ForeignAccess.Factory;
import com.oracle.truffle.api.interop.Message;
import com.oracle.truffle.api.interop.ForeignAccess;
import com.oracle.truffle.api.interop.TruffleObject;
import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.Truffle;
/**
* This foreign access factory is generated by {@link org.jruby.truffle.interop.RubyMessageResolution}.
* You are supposed to use it for the receiver object {@link org.jruby.truffle.language.RubyObjectType}.
*/
public final class RubyMessageResolutionForeign implements Factory18, Factory {
public static final ForeignAccess ACCESS = ForeignAccess.create(new RubyMessageResolutionForeign(), org.jruby.truffle.interop.CheckSub.createRoot(org.jruby.truffle.RubyLanguage.class));
public static ForeignAccess createAccess() { return ForeignAccess.create(new RubyMessageResolutionForeign(), org.jruby.truffle.interop.CheckSub.createRoot(org.jruby.truffle.RubyLanguage.class)); }
private RubyMessageResolutionForeign() { }
@Override
public boolean canHandle(TruffleObject obj) {
return (boolean) Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.CheckSub.createRoot(org.jruby.truffle.RubyLanguage.class)).call(obj);
}
@Override
public CallTarget accessIsNull() {
return Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignIsNullNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessIsExecutable() {
return Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignIsExecutableNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessIsBoxed() {
return Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignIsBoxedNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessHasSize() {
return Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignHasSizeNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessGetSize() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignGetSizeNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessUnbox() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignUnboxNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessRead() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignReadNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessWrite() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignWriteNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessExecute(int argumentsLength) {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignExecuteNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessInvoke(int argumentsLength) {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignInvokeNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessNew(int argumentsLength) {
return null;
}
@Override
public CallTarget accessKeys() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.interop.ForeignKeysNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessMessage(Message unknown) {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy