com.oracle.graal.python.builtins.objects.PNoneGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.builtins.objects;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.library.LibraryExport;
import com.oracle.truffle.api.nodes.DenyReplace;
@GeneratedBy(PNone.class)
final class PNoneGen {
static {
LibraryExport.register(PNone.class, new InteropLibraryExports());
}
private PNoneGen() {
}
@GeneratedBy(PNone.class)
private static final class InteropLibraryExports extends LibraryExport {
private InteropLibraryExports() {
super(InteropLibrary.class, PNone.class, false, false, 0);
}
@Override
protected InteropLibrary createUncached(Object receiver) {
assert receiver instanceof PNone;
InteropLibrary uncached = new Uncached(receiver);
return uncached;
}
@Override
protected InteropLibrary createCached(Object receiver) {
assert receiver instanceof PNone;
return new Cached(receiver);
}
@GeneratedBy(PNone.class)
private static final class Cached extends PythonAbstractObjectGen.InteropLibraryExports.Cached {
protected Cached(Object receiver) {
super(receiver);
}
@Override
public boolean isNull(Object receiver) {
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
return PNone.isNull((((PNone) receiver)));
}
}
@GeneratedBy(PNone.class)
@DenyReplace
private static final class Uncached extends PythonAbstractObjectGen.InteropLibraryExports.Uncached {
protected Uncached(Object receiver) {
super(receiver);
}
@Override
@TruffleBoundary
public boolean accepts(Object receiver) {
return super.accepts(receiver);
}
@TruffleBoundary
@Override
public boolean isNull(Object receiver) {
// declared: true
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
return PNone.isNull(((PNone) receiver) );
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy