arp.repository.copy.LongArrayFieldCopier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ARP Show documentation
Show all versions of ARP Show documentation
a java development framework with aggregation, repository and process
The newest version!
package arp.repository.copy;
import java.lang.reflect.Field;
import arp.util.Unsafe;
public class LongArrayFieldCopier extends BaseFieldCopier {
public LongArrayFieldCopier(Field field) {
super(field);
}
@Override
public void copyField(Object fromEntity, Object toEntity) {
long[] array = (long[]) Unsafe.getObjectFieldOfObject(fromEntity, fieldOffset);
Unsafe.setObjectFieldOfObject(toEntity, fieldOffset, array.clone());
}
}