@Nullable @Override public <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor) { SchemaProvider schemaProvider = providers.get(typeDescriptor); return (schemaProvider != null) ? schemaProvider.schemaFor(typeDescriptor) : null; }
/** * Retrieve a schema for a given {@link TypeDescriptor} type. If no schema exists, throws {@link * NoSuchSchemaException}. */ public <T> Schema getSchema(TypeDescriptor<T> typeDescriptor) throws NoSuchSchemaException { SchemaEntry entry = entries.get(typeDescriptor); if (entry != null) { return entry.schema; } return getProviderResult((SchemaProvider p) -> p.schemaFor(typeDescriptor)); }
@Override public <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor) { SchemaProvider schemaProvider = getSchemaProvider(typeDescriptor); return (schemaProvider != null) ? schemaProvider.schemaFor(typeDescriptor) : null; }