Top Description Fields Constructors Methods
org.glassfish.pfl.dynamic.copyobject.spi

public final Enum CopyType

extends Enum<CopyType>
Class Inheritance

Enum used with Copy annotation on fields to indicate special handling by the object copier. In what follows, the source is the object being copied, and the result is the resulting copy. field is the name of the annotated field.

Field Summary

Modifier and TypeField and Description
public static final CopyType
IDENTITY

Set result.field = source.field without copying

public static final CopyType
NULL

Set result.field = null or 0 according to type.

public static final CopyType
RECURSE

Standard behavior: apply standard copier to the value of the field.

public static final CopyType
RESULT

Set result.field = result.

public static final CopyType
SOURCE

Set result.field = source.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CopyType
public static CopyType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

IDENTITYback to summary
public static final CopyType IDENTITY

Set result.field = source.field without copying

NULLback to summary
public static final CopyType NULL

Set result.field = null or 0 according to type.

RECURSEback to summary
public static final CopyType RECURSE

Standard behavior: apply standard copier to the value of the field. This is the same thing that happens if the field is not annotated.

RESULTback to summary
public static final CopyType RESULT

Set result.field = result. Requires that the declared type of field is assignment compatible with the type of the object; that is, field.class.isAssignableFrom( this.class ).

SOURCEback to summary
public static final CopyType SOURCE

Set result.field = source. Requires that the declared type of field is assignment compatible with the type of the object; that is, field.class.isAssignableFrom( this.class ).

Constructor Detail

CopyTypeback to summary
private CopyType()

Method Detail

valueOfback to summary
public static CopyType valueOf(String name)
valuesback to summary
public static CopyType[] values()