com.bea.jvm.event
Class CompilationEvent

java.lang.Object
  extended by java.util.EventObject
      extended by 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.AccessibleObject constructorOrMethod, CodeGenerationStrategy strategy, OptimizationLevel optimizationLevel, long compilationTime)
           
CompilationEvent(java.lang.reflect.Constructor constructor, CodeGenerationStrategy strategy, long compilationTime)
          Constructor.
CompilationEvent(java.lang.reflect.Constructor constructor, OptimizationLevel optimizationlevel, long compilationTime)
          Deprecated. Replaced.
CompilationEvent(java.lang.reflect.Method method, CodeGenerationStrategy strategy, long compilationTime)
          Constructor.
CompilationEvent(java.lang.reflect.Method method, OptimizationLevel optimizationlevel, long compilationTime)
          Deprecated. Replaced.
CompilationEvent(java.lang.Object constructorOrMethod, CodeGenerationStrategy strategy, OptimizationLevel optimizationLevel, long compilationTime)
          Deprecated. Will be killed off in later releases.
 
Method Summary
 CodeGenerationStrategy getCodeGenerationStrategy()
          Returns the CodeGenerationStrategy that was used to compile the Method.
 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()
          Deprecated. Replaced.
 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)
Deprecated. Replaced.

Constructor.

Parameters:
method - the method that was compiled.
optimizationlevel - level of optimization used.
compilationTime - the time it took to compile the method in ns.
See Also:
CompilationEvent(Method, CodeGenerationStrategy, long)

CompilationEvent

public CompilationEvent(java.lang.reflect.Method method,
                        CodeGenerationStrategy strategy,
                        long compilationTime)
Constructor.

Parameters:
method - the method that was compiled.
strategy - the code generation strategy used.
compilationTime - the time it took to compile the method in ns.

CompilationEvent

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

Constructor.

Parameters:
constructor - the constructor that was compiled.
optimizationlevel - level of optimization used.
compilationTime - the time it took to compile the method in ns.
See Also:
CompilationEvent(Constructor, CodeGenerationStrategy, long)

CompilationEvent

public CompilationEvent(java.lang.reflect.Constructor constructor,
                        CodeGenerationStrategy strategy,
                        long compilationTime)
Constructor.

Parameters:
constructor - the constructor that was compiled.
strategy - the code generation strategy used.
compilationTime - the time it took to compile the method in ns.

CompilationEvent

public CompilationEvent(java.lang.Object constructorOrMethod,
                        CodeGenerationStrategy strategy,
                        OptimizationLevel optimizationLevel,
                        long compilationTime)
Deprecated. Will be killed off in later releases.

Temporary Constructor that will be removed with all the other deprecated methods in the next release.

Parameters:
constructorOrMethod - the constructor that was compiled.
strategy - the code generation strategy used.
compilationTime - the time it took to compile the method in ns.

CompilationEvent

public CompilationEvent(java.lang.reflect.AccessibleObject constructorOrMethod,
                        CodeGenerationStrategy strategy,
                        OptimizationLevel optimizationLevel,
                        long compilationTime)
Method Detail

getOptimizationLevel

public OptimizationLevel getOptimizationLevel()
Deprecated. Replaced.

Returns the OptimizationLevel that was used when compiling the Method.

Returns:
the OptimizationLevel used when compiling the Method.
See Also:
getCodeGenerationStrategy().

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.

getCodeGenerationStrategy

public CodeGenerationStrategy getCodeGenerationStrategy()
Returns the CodeGenerationStrategy that was used to compile the Method.

Returns:
the CodeGenerationStrategy that was used to compile the Method.


Copyright © 1999, 2008, Oracle and/or its affiliates. All rights reserved.