capnproto-java-rpc/runtime/src/main/java/org/capnproto/AnyPointer.java

18 lines
366 B
Java
Raw Normal View History

package org.capnproto;
public class AnyPointer {
public static class Reader {
public PointerReader reader;
public Reader(PointerReader reader) {
this.reader = reader;
}
public <T> T getAsStruct(FromStructReader<T> factory) {
return factory.fromStructReader(this.reader.getStruct());
}
}
}