Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*-
  * See the file LICENSE for redistribution information.
  *
  * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
  *
  */
 
 package com.sleepycat.persist.model;
 
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Overrides the default rules for field persistence and defines a field as being non-persistent even when it is not declared with the 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 non-transient (persistent) with respect to Java serialization but is transient with respect to the DPL.

      @NotPersistent
      int myField;
 }
 

Author(s):
Mark Hayes
See also:
NotTransient
public @interface NotPersistent {
New to GrepCode? Check out our FAQ X