fix --help message
This commit is contained in:
parent
245ff0b15d
commit
da8d0d1f56
2 changed files with 18 additions and 5 deletions
|
@ -179,11 +179,10 @@ public:
|
||||||
CapnpcJavaMain(kj::ProcessContext& context): context(context) {}
|
CapnpcJavaMain(kj::ProcessContext& context): context(context) {}
|
||||||
|
|
||||||
kj::MainFunc getMain() {
|
kj::MainFunc getMain() {
|
||||||
return kj::MainBuilder(context, "Cap'n Proto loopback plugin version " VERSION,
|
return kj::MainBuilder(context, "Cap'n Proto Java plugin version " VERSION,
|
||||||
"This is a Cap'n Proto compiler plugin which \"de-compiles\" the schema back into "
|
"This is a Cap'n Proto compiler plugin which generates Java code."
|
||||||
"Cap'n Proto schema language format, with comments showing the offsets chosen by the "
|
" This is meant to be run using the Cap'n Proto compiler, e.g.:\n"
|
||||||
"compiler. This is meant to be run using the Cap'n Proto compiler, e.g.:\n"
|
" capnp compile -ojava foo.capnp")
|
||||||
" capnp compile -ocapnp foo.capnp")
|
|
||||||
.callAfterParsing(KJ_BIND_METHOD(*this, run))
|
.callAfterParsing(KJ_BIND_METHOD(*this, run))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
@ -1006,6 +1005,11 @@ private:
|
||||||
case schema::Type::UINT64:
|
case schema::Type::UINT64:
|
||||||
case schema::Type::FLOAT32:
|
case schema::Type::FLOAT32:
|
||||||
case schema::Type::FLOAT64:
|
case schema::Type::FLOAT64:
|
||||||
|
builderFactoryType = kj::str("ord.capnproto.PrimitiveElementFactory.",
|
||||||
|
toUpperCase(kj::str(typeName(typeBody.getList().getElementType()))));
|
||||||
|
readerFactoryType = kj::str(builderFactoryType);
|
||||||
|
primitiveElement = true;
|
||||||
|
break;
|
||||||
case schema::Type::ENUM:
|
case schema::Type::ENUM:
|
||||||
primitiveElement = true;
|
primitiveElement = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4,6 +4,7 @@ public interface PrimitiveElementFactory<T> {
|
||||||
public T get(ListReader listReader, int index);
|
public T get(ListReader listReader, int index);
|
||||||
|
|
||||||
public static final PrimitiveElementFactory<Void> VOID = new PrimitiveElementFactoryVoid();
|
public static final PrimitiveElementFactory<Void> VOID = new PrimitiveElementFactoryVoid();
|
||||||
|
// public static final PrimitiveElementFactory<boolean> BOOLEAN = new PrimitiveElementFactoryBoolean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,3 +14,11 @@ class PrimitiveElementFactoryVoid implements PrimitiveElementFactory<Void> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
argh, generics must be boxed.
|
||||||
|
class PrimitiveElementFactoryBoolean implements PrimitiveElementFactory<boolean> {
|
||||||
|
public boolean get(ListReader listReader, int index) {
|
||||||
|
throw new Error("unimplemented");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
Loading…
Reference in a new issue