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

## com.bea.jvm.event
Class FinalizationEvent

    java.lang.Object
      |
      +--java.util.EventObject
            |
            +--com.bea.jvm.event.FinalizationEvent

All Implemented Interfaces:
  java.io.Serializable

public class FinalizationEvent
extends java.util.EventObject

Event delivered when an Object has been finalized.

NOTE: While this event and the Object it wraps are alive, actual garbage collection of the Object is prevented

Author:
  Calle Wilund, Marcus Hirt
See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`FinalizationEvent(java.lang.Object finalizedObject)` Constructor.
`FinalizationEvent(java.lang.Object finalizedObject, java.lang.Throwable causeOfFailure)` Constructor.

Method Summary
`boolean` | `finalizerFailed()` Returns true if an exception was thrown in the finalizer.
`java.lang.Throwable` | `getCauseOfFailure()` Returns the throwable that caused the finalizer to fail, or null if everything went fine.
`java.lang.Object` | `getObject()` Returns a reference to the Object that was finalized.

Methods inherited from class java.util.EventObject
`getSource, toString`

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

Constructor Detail

### FinalizationEvent

    public FinalizationEvent(java.lang.Object finalizedObject)

  Constructor.

Parameters:
  `finalizedObject` - the object being finalized.

### FinalizationEvent

    public FinalizationEvent(java.lang.Object finalizedObject,
                             java.lang.Throwable causeOfFailure)

  Constructor.

Parameters:
  `finalizedObject` - the object being finalized.
  `causeOfFailure` - the exception that caused the finalizer to fail.

Method Detail

### getObject

    public java.lang.Object getObject()

  Returns a reference to the Object that was finalized. It's recommended to relase this reference as soon as possible. Do what you must with the Object and let go.

  Returns:
    the Object that was finalized.

### finalizerFailed

    public boolean finalizerFailed()

  Returns true if an exception was thrown in the finalizer.

  Returns:
    true if the finalizer failed (threw an exception).

### getCauseOfFailure

    public java.lang.Throwable getCauseOfFailure()

  Returns the throwable that caused the finalizer to fail, or null if everything went fine.

  Returns:
    the throwable that caused a failed finalizer. Returns null if the finalization didn't fail.

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