| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| private static class | ClassCopierOrdinaryImpl.
Use bridge to copy objects. |
| private abstract static class | ClassCopierOrdinaryImpl.
Class used as a factory for the appropriate Serialization constructors. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Bridge | BRIDGE_REF
Bridge is used to access unsafe methods used to read and write arbitrary data members in objects. |
| private final ClassCopierOrdinaryImpl. | |
| private static Map | |
| private static Map | |
| private static final Package | |
| private static final Package | |
| private final Constructor | |
| private static ThreadLocal | |
| private final MethodHandle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | createCopy(Object source)
Implements abstract org. Create a copy of source. |
| public Object | |
| private static synchronized ClassCopierOrdinaryImpl. | |
| private static synchronized ClassCopierOrdinaryImpl. | |
| private static synchronized ClassCopierOrdinaryImpl. | makeClassFieldCopierUnsafeCodegenImpl(final Class<?> cls, final PipelineClassCopierFactory classCopierFactory)
Use bridge with code generated by codegen to copy objects. |
| private Object | |
| public static void | |
| private static boolean |
| BRIDGE_REF | back to summary |
|---|---|
| private static final Bridge BRIDGE_REF Bridge is used to access unsafe methods used to read and write arbitrary data members in objects. This is very fast, and completely ignores access protections including final on fields. NOTE WELL: Unsafe is capable of causing severe damage to the VM, including causing the VM to dump core. get and put calls must only be made with offsets obtained from objectFieldOffset calls. Because of the dangerous nature of Unsafe, its use must be carefully protected. | |
| classFieldCopier | back to summary |
|---|---|
| private final ClassCopierOrdinaryImpl. | |
| classToClassFieldCopier | back to summary |
|---|---|
| private static Map<Class<?>, ClassCopierOrdinaryImpl. | |
| classToConstructor | back to summary |
|---|---|
| private static Map<Class<?>, Constructor<?>> classToConstructor | |
| CODEGEN_IMPL | back to summary |
|---|---|
| private static final Package CODEGEN_IMPL | |
| CODEGEN_SPI | back to summary |
|---|---|
| private static final Package CODEGEN_SPI | |
| constructor | back to summary |
|---|---|
| private final Constructor<?> constructor | |
| isCodegenCopierAllowed | back to summary |
|---|---|
| private static ThreadLocal<Boolean> isCodegenCopierAllowed | |
| readResolveMethod | back to summary |
|---|---|
| private final MethodHandle readResolveMethod | |
| ClassCopierOrdinaryImpl | back to summary |
|---|---|
| public ClassCopierOrdinaryImpl(PipelineClassCopierFactory ccf, Class<?> cls) throws ReflectiveCopyException | |
| createCopy | back to summary |
|---|---|
| public Object createCopy(Object source) throws ReflectiveCopyException Implements abstract org. Doc from org. Create a copy of source. The copy may or may not be fully initialized. This method must always be overridden in a subclass.
| |
| doCopy | back to summary |
|---|---|
| public Object doCopy(Map<Object, Object> oldToNew, Object source, Object result) throws ReflectiveCopyException Overrides org. Doc from org. Do the copying of data from source to result. This just returns the result by default, but it may be overrideden in a subclass. When this method completes, result must be fully initialized.
| |
| getClassFieldCopier | back to summary |
|---|---|
| private static synchronized ClassCopierOrdinaryImpl. | |
| getSuperCopier | back to summary |
|---|---|
| private static synchronized ClassCopierOrdinaryImpl. | |
| makeClassFieldCopierUnsafeCodegenImpl | back to summary |
|---|---|
| private static synchronized ClassCopierOrdinaryImpl. Use bridge with code generated by codegen to copy objects. This method must be invoked from inside a doPrivileged call. | |
| resolve | back to summary |
|---|---|
| private Object resolve(Object obj) | |
| setCodegenCopierAllowed | back to summary |
|---|---|
| public static void setCodegenCopierAllowed(boolean flag) | |
| useCodegenCopier | back to summary |
|---|---|
| private static boolean useCodegenCopier() | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| copy | back to summary |
|---|---|
| public void copy(Map<Object, Object> oldToNew, Object src, Object dest) throws ReflectiveCopyException Copy all fields from src to dest, using oldToNew as usual to preserve aliasing. This copies all fields declared in the class, as well as in the super class. | |
| Modifier and Type | Class and Description |
|---|---|
| private abstract static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private boolean | |
| private ClassCopierOrdinaryImpl. | |
| private ClassCopierOrdinaryImpl. | |
| private ClassCopierOrdinaryImpl. | |
| public String |
| booleanUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| booleanUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| byteUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| byteUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| charUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| charUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| classCopierFactory | back to summary |
|---|---|
| private final PipelineClassCopierFactory classCopierFactory | |
| doubleUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| doubleUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| fieldCopiers | back to summary |
|---|---|
| private final ClassCopierOrdinaryImpl. | |
| fieldOffsets | back to summary |
|---|---|
| private final long[] fieldOffsets | |
| floatUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| floatUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| intUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| intUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| longUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| longUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| myClass | back to summary |
|---|---|
| private final Class<?> myClass | |
| objectUnsafeFieldCopier | back to summary |
|---|---|
| private final ClassCopierOrdinaryImpl. | |
| objectUnsafeFieldIdentityCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| objectUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| objectUnsafeFieldResultCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| objectUnsafeFieldSourceCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| shortUnsafeFieldCopier | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| shortUnsafeFieldInitializer | back to summary |
|---|---|
| private static ClassCopierOrdinaryImpl. | |
| superCopier | back to summary |
|---|---|
| private final ClassCopierOrdinaryImpl. | |
| ClassFieldCopierUnsafeImpl | back to summary |
|---|---|
| public ClassFieldCopierUnsafeImpl(Class<?> cls, PipelineClassCopierFactory ccf) throws ReflectiveCopyException | |
| copy | back to summary |
|---|---|
| public void copy(Map<Object, Object> oldToNew, Object source, Object result) throws ReflectiveCopyException Implements org. Doc from org. Copy all fields from src to dest, using oldToNew as usual to preserve aliasing. This copies all fields declared in the class, as well as in the super class.
| |
| fieldIsCopyable | back to summary |
|---|---|
| private boolean fieldIsCopyable(Field field) | |
| getPrimitiveFieldCopier | back to summary |
|---|---|
| private ClassCopierOrdinaryImpl. | |
| getPrimitiveFieldInitializer | back to summary |
|---|---|
| private ClassCopierOrdinaryImpl. | |
| getUnsafeFieldCopier | back to summary |
|---|---|
| private ClassCopierOrdinaryImpl. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract void |
| bridge | back to summary |
|---|---|
| protected Bridge bridge | |
| UnsafeFieldCopier | back to summary |
|---|---|
| public UnsafeFieldCopier(Bridge bridge) | |
| copy | back to summary |
|---|---|
| pack-priv abstract void copy(Map<Object, Object> oldToNew, long offset, Object src, Object dest) throws ReflectiveCopyException | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static Constructor | getDefaultConstructor(Class<?> clazz)
Returns a constructor based on the first no-args constructor in the super class chain. |
| private static Constructor | getExternalizableConstructor(Class<?> cl)
Returns public no-arg constructor of given class, or null if none found. |
| private static Constructor | getSerializableConstructor(Class<?> clazz)
Returns subclass-accessible no-arg constructor of first non-serializable superclass, or null if none found. |
| private static Constructor |
| ConstructorFactory | back to summary |
|---|---|
| private ConstructorFactory() | |
| getDefaultConstructor | back to summary |
|---|---|
| private static Constructor Returns a constructor based on the first no-args constructor in the super class chain. This allows us to construct an instance of any class at all, serializable or not. | |
| getExternalizableConstructor | back to summary |
|---|---|
| private static Constructor Returns public no-arg constructor of given class, or null if none found. Access checks are disabled on the returned constructor (if any), since the defining class may still be non-public.
| |
| getSerializableConstructor | back to summary |
|---|---|
| private static Constructor Returns subclass-accessible no-arg constructor of first non-serializable superclass, or null if none found. Access checks are disabled on the returned constructor (if any).
| |
| makeConstructor | back to summary |
|---|---|
| private static Constructor Analyze the class to determine the correct constructor type. Returns the appropriate constructor. | |