@SuppressWarnings("unchecked") public Builder hiddenImpl(String className, Class<?>... types) { // don't do any work if an implementation has been found if (ctor != null) { return this; } try { Class targetClass = Class.forName(className, true, loader); hiddenImpl(targetClass, types); } catch (NoClassDefFoundError | ClassNotFoundException e) { // cannot load this implementation problems.put(className, e); } return this; }
public Builder impl(String className, Class<?>... types) { // don't do any work if an implementation has been found if (ctor != null) { return this; } try { Class<?> targetClass = Class.forName(className, true, loader); impl(targetClass, types); } catch (NoClassDefFoundError | ClassNotFoundException e) { // cannot load this implementation problems.put(className, e); } return this; }
public static Builder builder(Class<?> baseClass) { return new Builder(baseClass); }
public static Builder builder() { return new Builder(); }
public Builder ctorImpl(String className, Class<?>... argClasses) { // don't do any work if an implementation has been found if (method != null) { return this; } try { this.method = new DynConstructors.Builder() .impl(className, argClasses) .buildChecked(); } catch (NoSuchMethodException e) { // not the right implementation } return this; }
public Builder ctorImpl(Class<?> targetClass, Class<?>... argClasses) { // don't do any work if an implementation has been found if (method != null) { return this; } try { this.method = new DynConstructors.Builder() .impl(targetClass, argClasses) .buildChecked(); } catch (NoSuchMethodException e) { // not the right implementation } return this; }
public Builder hiddenImpl(Class<?>... types) { hiddenImpl(baseClass, types); return this; }
IndexedRecordReader(List<ValueReader<?>> readers, Class<R> recordClass, Schema schema) { super(readers); this.recordClass = recordClass; this.ctor = DynConstructors.builder(IndexedRecord.class) .hiddenImpl(recordClass, Schema.class) .hiddenImpl(recordClass) .build(); this.schema = schema; }