public final void copyPrimitiveAtOffset ( Object source , Object copy , Class < ? > type , long offset ) { if ( java . lang . Boolean . TYPE == type ) { boolean origFieldValue = THE_UNSAFE . getBoolean ( source , offset ) ; THE_UNSAFE . putBoolean ( copy , offset , origFieldValue ) ; } else if ( java . lang . Byte . TYPE == type ) { byte origFieldValue = THE_UNSAFE . getByte ( source , offset ) ; THE_UNSAFE . putByte ( copy , offset , origFieldValue ) ; } else if ( java . lang . Character . TYPE == type ) { char origFieldValue = THE_UNSAFE . getChar ( source , offset ) ; THE_UNSAFE . putChar ( copy , offset , origFieldValue ) ; } else if ( java . lang . Short . TYPE == type ) { short origFieldValue = THE_UNSAFE . getShort ( source , offset ) ; THE_UNSAFE . putShort ( copy , offset , origFieldValue ) ; } else if ( java . lang . Integer . TYPE == type ) { int origFieldValue = THE_UNSAFE . getInt ( source , offset ) ; THE_UNSAFE . putInt ( copy , offset , origFieldValue ) ; } else if ( java . lang . Long . TYPE == type ) { long origFieldValue = THE_UNSAFE . getLong ( source , offset ) ; THE_UNSAFE . putLong ( copy , offset , origFieldValue ) ; } else if ( java . lang . Float . TYPE == type ) { float origFieldValue = THE_UNSAFE . getFloat ( source , offset ) ; THE_UNSAFE . putFloat ( copy , offset , origFieldValue ) ; } else if ( java . lang . Double . TYPE == type ) { double origFieldValue = THE_UNSAFE . getDouble ( source , offset ) ; THE_UNSAFE . putDouble ( copy , offset , origFieldValue ) ; } }
Copies the primitive of the specified type from the given field offset in the source object to the same location in the copy