@Test public void testGenericOf() { try { ProtobufSchema<org.apache.pulsar.client.schema.proto.Test.TestMessage> protobufSchema = ProtobufSchema.ofGenericClass(org.apache.pulsar.client.schema.proto.Test.TestMessage.class, new HashMap<>()); } catch (Exception e) { Assert.fail("Should not construct a ProtobufShema over a non-protobuf-generated class"); } try { ProtobufSchema<org.apache.pulsar.client.schema.proto.Test.TestMessage> protobufSchema = ProtobufSchema.ofGenericClass(String.class, Collections.emptyMap()); Assert.fail("Should not construct a ProtobufShema over a non-protobuf-generated class"); } catch (Exception e) { } }
public static <T> ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties) { SchemaDefinition<T> schemaDefinition = SchemaDefinition.<T>builder().withPojo(pojo).withProperties(properties).build(); return ProtobufSchema.of(schemaDefinition); }
ProtobufSchema extends StructSchema<T> { public static <T> ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties) { SchemaDefinition<T> schemaDefinition = SchemaDefinition.<T>builder().withPojo(pojo).withProperties(properties).build(); return ProtobufSchema.of(schemaDefinition); } }
ProtobufSchema extends StructSchema<T> { public static <T> ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties) { SchemaDefinition<T> schemaDefinition = SchemaDefinition.<T>builder().withPojo(pojo).withProperties(properties).build(); return ProtobufSchema.of(schemaDefinition); } private  ProtobufSchema(SchemaInfo schemaInfo, T protoMessageInstance); }
ProtobufSchema extends StructSchema<T> { public static <T> ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties) { SchemaDefinition<T> schemaDefinition = SchemaDefinition.<T>builder().withPojo(pojo).withProperties(properties).build(); return ProtobufSchema.of(schemaDefinition); } private  ProtobufSchema(SchemaInfo schemaInfo, T protoMessageInstance); static ProtobufSchema<T> of(Class<T> pojo); static ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties); static ProtobufSchema of(SchemaDefinition<T> schemaDefinition); static ProtobufSchema<T> of(
            Class pojo, Map<String, String> properties); }
ProtobufSchema extends StructSchema<T> { public static <T> ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties) { SchemaDefinition<T> schemaDefinition = SchemaDefinition.<T>builder().withPojo(pojo).withProperties(properties).build(); return ProtobufSchema.of(schemaDefinition); } private  ProtobufSchema(SchemaInfo schemaInfo, T protoMessageInstance); static ProtobufSchema<T> of(Class<T> pojo); static ProtobufSchema ofGenericClass(Class<T> pojo, Map<String, String> properties); static ProtobufSchema of(SchemaDefinition<T> schemaDefinition); static ProtobufSchema<T> of(
            Class pojo, Map<String, String> properties); static final String PARSING_INFO_PROPERTY; }