@Documented
@Retention(RUNTIME)
@Target(FIELD)
public @interface NotTransient
transient
keyword.
By default, the persistent fields of a class are all declared instance
fields that are non-transient (are not declared with the
transient
keyword). The default rules may be overridden by
specifying the NotPersistent
or NotTransient
annotation.
For example, the following field is transient with respect to Java serialization but is persistent with respect to the DPL.
@NotTransient
transient int myField;
}
NotPersistent
Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.