TransientReference (Java Card API, Connected Edition)
Date: 2009-12-11

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javacardx.framework
Class TransientReference<T>

    java.lang.Object
      javacardx.framework.TransientReference<T>

    @TransactionType(value=NOT_SUPPORTED)
    public final class TransientReference<T>

extends Object

TransientReference objects prevent their referents from being promoted to persistent storage when they are not otherwise reachable from objects in the persistent storage.

References held by transient reference objects are systematically cleared after a platform reset. This happens regardless of the actual status of the referred objects, that is regardless of whether the referred objects have been promoted to persistent storage by virtue of being reachable from the persistent storage through other references.

Since:
  Java Card 3.0

Constructor Summary
`TransientReference(T referent)` Creates a new transient reference that refers to the given object.

Method Summary
`void` | `clear()` Clears this reference object.
`T` | `get()` Returns this reference object's referent.
`void` | `set(T referent)` Sets this reference to refer to the given object.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TransientReference

    public TransientReference(T referent)

  Creates a new transient reference that refers to the given object.

  Parameters:
    `referent` - object the new transient reference will refer to.

Method Detail

### clear

    public void clear()

  Clears this reference object.

### get

    public T get()

  Returns this reference object's referent. If this reference object has been cleared, either by the program or after a platform reset, then this method returns `null`.

  Returns:
    The object to which this reference refers, or `null` if this reference object has been cleared

### set

    public void set(T referent)

  Sets this reference to refer to the given object.

  Parameters:
    `referent` - object the new transient reference will refer to.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.