Field extends AnnotationContainer implements Comparable<Field<?>>, HasName, HasOptions { public java.lang.String getProtoType() { return this.getClass().getSimpleName().toLowerCase(); } Field();  Field(boolean packable); @Override Proto getProto(); LinkedHashMap<java.lang.String, Object> getStandardOptions(); LinkedHashMap<java.lang.String, Object> getExtraOptions(); LinkedHashMap<java.lang.String, Object> getO(); @Override LinkedHashMap<java.lang.String, Object> getOptions(); @SuppressWarnings("unchecked") V getOption(java.lang.String key); boolean hasOption(java.lang.String key); @Override void putStandardOption(java.lang.String key, Object value); @Override void putExtraOption(java.lang.String key, Object value); @Override java.lang.String getName(); java.lang.String getDefaultValueConstant(); int getNumber(); Modifier getModifier(); boolean isPackable(); T getDefaultValue(); boolean isRepeated(); boolean isRequired(); boolean isOptional(); boolean isDefaultValueSet(); boolean isNumberField(); boolean isEnumField(); boolean isMessageField(); boolean isBytesField(); boolean isStringField(); boolean isBoolField(); boolean isDelimited(); java.lang.String toString(); @Override int compareTo(Field<?> f); abstract java.lang.String getJavaType(); java.lang.String getProtoType(); java.lang.String getDefaultValueAsString(); Message getOwner();  }
@Test public void testBasicProtoTypes() throws Exception { Assert.assertEquals("double", new Field.Double().getProtoType()); Assert.assertEquals("float", new Field.Float().getProtoType()); Assert.assertEquals("int32", new Field.Int32().getProtoType()); Assert.assertEquals("int64", new Field.Int64().getProtoType()); Assert.assertEquals("uint32", new Field.UInt32().getProtoType()); Assert.assertEquals("uint64", new Field.UInt64().getProtoType()); Assert.assertEquals("sint32", new Field.SInt32().getProtoType()); Assert.assertEquals("sint64", new Field.SInt64().getProtoType()); Assert.assertEquals("fixed32", new Field.Fixed32().getProtoType()); Assert.assertEquals("fixed64", new Field.Fixed64().getProtoType()); Assert.assertEquals("sfixed32", new Field.SFixed32().getProtoType()); Assert.assertEquals("sfixed64", new Field.SFixed64().getProtoType()); Assert.assertEquals("bool", new Field.Bool().getProtoType()); Assert.assertEquals("string", new Field.String().getProtoType()); Assert.assertEquals("bytes", new Field.Bytes().getProtoType()); }