org.jruby.truffle.cext.DataMessageResolutionForeign Maven / Gradle / Ivy
The newest version!
package org.jruby.truffle.cext;
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;
import com.oracle.truffle.api.nodes.RootNode;
/**
* This foreign access factory is generated by {@link org.jruby.truffle.cext.DataMessageResolution}.
* You are supposed to use it for the receiver object {@link org.jruby.truffle.cext.DataAdapter}.
*/
public final class DataMessageResolutionForeign implements Factory18, Factory {
public static final ForeignAccess ACCESS = ForeignAccess.create(new DataMessageResolutionForeign(), org.jruby.truffle.cext.TypedDataCheckNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
public static ForeignAccess createAccess() { return ForeignAccess.create(new DataMessageResolutionForeign(), org.jruby.truffle.cext.TypedDataCheckNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class)); }
private DataMessageResolutionForeign() { }
@Override
public boolean canHandle(TruffleObject obj) {
return (boolean) Truffle.getRuntime().createCallTarget(org.jruby.truffle.cext.TypedDataCheckNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class)).call(obj);
}
@Override
public CallTarget accessIsNull() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
@Override
public CallTarget accessIsExecutable() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
@Override
public CallTarget accessIsBoxed() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
@Override
public CallTarget accessHasSize() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
@Override
public CallTarget accessGetSize() {
return null;
}
@Override
public CallTarget accessUnbox() {
return null;
}
@Override
public CallTarget accessRead() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.cext.TypedDataReadNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessWrite() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(org.jruby.truffle.cext.TypedDataWriteNodeSub.createRoot(org.jruby.truffle.RubyLanguage.class));
}
@Override
public CallTarget accessExecute(int argumentsLength) {
return null;
}
@Override
public CallTarget accessInvoke(int argumentsLength) {
return null;
}
@Override
public CallTarget accessNew(int argumentsLength) {
return null;
}
@Override
public CallTarget accessKeys() {
return null;
}
@Override
public CallTarget accessMessage(Message unknown) {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy