AvroUtil { public static boolean denotesPrimitiveValue(Schema schema) { switch (schema.getType()) { case INT : case BOOLEAN : case ENUM : case BYTES : case LONG : case FIXED : case FLOAT: case DOUBLE : case STRING : return true; default : return false; } } private  AvroUtil(); static boolean isRecordType(Schema schema); static Type primaryTypeIn(Schema schema); static boolean allowsNull(Schema schema); static Schema parseSchema(String schemaString); static Schema schemaFrom(URL url); static String childIntNodeAsString(Field field, String childId); static String defaultFor(Field field); static boolean denotesPrimitiveValue(Schema schema); static boolean isNullableSingleType(Field field); static boolean isNullableSingleType(List<Schema> types); static Schema nonNullSchemaIn(List<Schema> types); static Schema nullableSingleTypeIn(List<Schema> types);  }
@Test public void denotesPrimitiveValue() { Field field = Person.SCHEMA$.getField("bellybuttons"); assertTrue( AvroUtil.denotesPrimitiveValue( field.schema() )); assertFalse( AvroUtil.denotesPrimitiveValue(Person.SCHEMA$)); }