@Test public void testGetDetachedValue_GenericAvroType() { AvroType<Record> genericType = Avros.generics(Person.SCHEMA$); GenericData.Record record = new GenericData.Record(Person.SCHEMA$); record.put("name", "name value"); record.put("age", 42); record.put("siblingnames", Lists.newArrayList()); Record detachedRecord = genericType.getDetachedValue(record); assertEquals(record, detachedRecord); assertNotSame(record, detachedRecord); }
public T getDetachedValue(T value) { if (this.baseInputMapFn instanceof IdentityFn && !Avros.isPrimitive(this)) { return getDeepCopier().deepCopy(value); } return value; }
AvroType implements PType<T> { public T getDetachedValue(T value) { if (this.baseInputMapFn instanceof IdentityFn && !Avros.isPrimitive(this)) { return getDeepCopier().deepCopy(value); } return value; } }
AvroType implements PType<T> { public T getDetachedValue(T value) { if (this.baseInputMapFn instanceof IdentityFn && !Avros.isPrimitive(this)) { return getDeepCopier().deepCopy(value); } return value; } AvroType(Class<T> typeClass, Schema schema, PType... ptypes);  AvroType(Class<T> typeClass, Schema schema, MapFn inputMapFn,
			MapFn outputMapFn, PType... ptypes); }
AvroType implements PType<T> { public T getDetachedValue(T value) { if (this.baseInputMapFn instanceof IdentityFn && !Avros.isPrimitive(this)) { return getDeepCopier().deepCopy(value); } return value; } AvroType(Class<T> typeClass, Schema schema, PType... ptypes);  AvroType(Class<T> typeClass, Schema schema, MapFn inputMapFn,
			MapFn outputMapFn, PType... ptypes); @Override Class<T> getTypeClass(); @Override PTypeFamily getFamily(); @Override List<PType> getSubTypes(); Schema getSchema(); boolean isSpecific(); boolean isGeneric(); MapFn<Object, T> getInputMapFn(); MapFn<T, Object> getOutputMapFn(); @Override Converter getConverter(); @Override SourceTarget<T> getDefaultFileSource(Path path); T getDetachedValue(T value); @Override boolean equals(Object other); @Override int hashCode(); }
AvroType implements PType<T> { public T getDetachedValue(T value) { if (this.baseInputMapFn instanceof IdentityFn && !Avros.isPrimitive(this)) { return getDeepCopier().deepCopy(value); } return value; } AvroType(Class<T> typeClass, Schema schema, PType... ptypes);  AvroType(Class<T> typeClass, Schema schema, MapFn inputMapFn,
			MapFn outputMapFn, PType... ptypes); @Override Class<T> getTypeClass(); @Override PTypeFamily getFamily(); @Override List<PType> getSubTypes(); Schema getSchema(); boolean isSpecific(); boolean isGeneric(); MapFn<Object, T> getInputMapFn(); MapFn<T, Object> getOutputMapFn(); @Override Converter getConverter(); @Override SourceTarget<T> getDefaultFileSource(Path path); T getDetachedValue(T value); @Override boolean equals(Object other); @Override int hashCode();  }