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 CompilationEvent

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

All Implemented Interfaces:
  java.io.Serializable

public class CompilationEvent
extends java.util.EventObject

An event delivered when a Method is compiled by the JVM.

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

Field Summary

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

Constructor Summary
`CompilationEvent(java.lang.reflect.Constructor constructor, OptimizationLevel optimizationlevel, long compilationTime)` Constructor.
`CompilationEvent(java.lang.reflect.Method method, OptimizationLevel optimizationlevel, long compilationTime)` Constructor.

Method Summary
`long` | `getCompilationTime()` Returns the time, in nanoseconds, it took to compile this method.
`java.lang.reflect.Constructor` | `getConstructor()` Returns the Constructor that was compiled, which ultimately caused this event to be created.
`java.lang.reflect.Method` | `getMethod()` Returns the Method that was compiled, which ultimately caused this event to be created.
`OptimizationLevel` | `getOptimizationLevel()` Returns the OptimizationLevel that was used when compiling the Method.
`boolean` | `hasConstructor()` Returns true if this event has a Constructor, and not a Method.

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

### CompilationEvent

    public CompilationEvent(java.lang.reflect.Method method,
                            OptimizationLevel optimizationlevel,
                            long compilationTime)

  Constructor.

Parameters:
  `method` - the method that was compiled.
  `optimizationlevel` - level of optimization used.
  `compilationTime` - the time it took to compile the method in ns.

### CompilationEvent

    public CompilationEvent(java.lang.reflect.Constructor constructor,
                            OptimizationLevel optimizationlevel,
                            long compilationTime)

  Constructor.

Parameters:
  `constructor` - the constructor that was compiled.
  `optimizationlevel` - level of optimization used.
  `compilationTime` - the time it took to compile the method in ns.

Method Detail

### getOptimizationLevel

    public OptimizationLevel getOptimizationLevel()

  Returns the OptimizationLevel that was used when compiling the Method.

  Returns:
    the OptimizationLevel used when compiling the Method.

### getMethod

    public java.lang.reflect.Method getMethod()
                                       throws NotAvailableException

  Returns the Method that was compiled, which ultimately caused this event to be created. Will return null if a Constructor was compiled.

  Returns:
    the Method that was compiled.
  Throws:
    `NotAvailableException` - if this functionality isn't available in this JVM.

### getConstructor

    public java.lang.reflect.Constructor getConstructor()
                                                 throws NotAvailableException

  Returns the Constructor that was compiled, which ultimately caused this event to be created. Will return null if a Method was compiled.

  Returns:
    the Constructor that was compiled.
  Throws:
    `NotAvailableException` - if this functionality isn't available in this JVM.

### hasConstructor

    public boolean hasConstructor()

  Returns true if this event has a Constructor, and not a Method. (As a result of a Constructor being compiled.)

  Returns:
    true if this event has a Constructor.

### getCompilationTime

    public long getCompilationTime()

  Returns the time, in nanoseconds, it took to compile this method.

  Returns:
    the time, in nanoseconds, it took to compile this method.

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