|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to the compilation (machine code generation) unit of the JVM.
Method Summary | |
void |
addCompilationListener(CompilationListener listener)
Adds a listener to recieve notification when a method is compiled. |
boolean |
forceCompilation(java.lang.reflect.Constructor constructor)
Force the compiler to generate code for the specified Constructor using the default OptimizationLevel. |
boolean |
forceCompilation(java.lang.reflect.Constructor constructor,
CodeGenerationStrategy strategy)
Forces the compiler to generate code for the specified constructor using the specified CodeGenerationStrategy. |
boolean |
forceCompilation(java.lang.reflect.Constructor constructor,
OptimizationLevel optLevel)
Forces the compiler to generate code for the specified constructor using the specified OptimizationLevel. |
boolean |
forceCompilation(java.lang.reflect.Method method)
Force the compiler to generate code for this method using the default OptimizationLevel. |
boolean |
forceCompilation(java.lang.reflect.Method method,
CodeGenerationStrategy strategy)
Deprecated. Replaced. @see |
boolean |
forceCompilation(java.lang.reflect.Method method,
OptimizationLevel optLevel)
Deprecated. Replaced. @see |
java.util.List |
getCodeGenerationStrategies()
Returns an immutable List of the available CodeGenerationStrategies available in this CompilationSystem, in ascending order, i.e. starting with the lowest level (quick), followed by increasingly advanced strategies. |
CodeGenerationStrategy |
getCodeGenerationStrategy(java.lang.reflect.Constructor constructor)
Returns the CodeGenerationStrategy for a Constructor. |
CodeGenerationStrategy |
getCodeGenerationStrategy(java.lang.reflect.Method method)
Returns the CodeGenerationStrategy that was used for generating the Method. |
OptimizationLevel |
getOptimizationLevel(java.lang.reflect.Constructor constructor)
Deprecated. Replaced. @see CompilationSystem#getCodeGenerationStrategy(Constructor) |
OptimizationLevel |
getOptimizationLevel(java.lang.reflect.Method method)
Deprecated. Replaced. @see CompilationSystem#getCodeGenerationStrategy(Method) |
java.util.List |
getOptimizationLevels()
Deprecated. Replaced by getCodeGenerationStrategies(). |
boolean |
isCompiled(java.lang.reflect.Constructor constructor)
Returns boolean true if the Constructor is compiled, false otherwise. |
boolean |
isCompiled(java.lang.reflect.Method method)
Returns boolean true if the Method is compiled, false otherwise. |
boolean |
isOptimized(java.lang.reflect.Constructor constructor)
Returns boolean true if the constructor is optimized, i.e. has been generated using the optimizing code generation strategy. |
boolean |
isOptimized(java.lang.reflect.Method method)
Returns boolean true if the method is optimized, i.e. has been generated using the optimizing code generation strategy. |
boolean |
isOptimizing()
This method returns boolean false if optimization is turned off (i.e. |
void |
redefineMethod(java.lang.reflect.Method method,
byte[] buffer,
int offset,
int length)
Redefines the specified method. |
void |
removeCompilationListener(CompilationListener listener)
Removes a listener which recieves notification when a method is compiled. |
void |
setOptimizing(boolean optimize)
This method will turn on or off optimizations. |
Methods inherited from interface com.bea.jvm.Describable |
getDescription |
Method Detail |
public java.util.List getOptimizationLevels() throws NotAvailableException
NotAvailableException
- if this functionality isn't available in
this JVM.OptimizationLevel
public java.util.List getCodeGenerationStrategies() throws NotAvailableException
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean isCompiled(java.lang.reflect.Method method) throws NotAvailableException
method
- the method to check.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean isCompiled(java.lang.reflect.Constructor constructor) throws NotAvailableException
constructor
- the constructor to check.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean isOptimized(java.lang.reflect.Method method) throws NotAvailableException
method
- the Method to check.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean isOptimizing() throws NotAvailableException
NotAvailableException
- if this functionality isn't available in
this JVM.public void setOptimizing(boolean optimize) throws NotAvailableException
optimize
- if true the hotspot detector will be allowed to
enqueue methods for optimization. If false, the hotspot detector
will cease to enqueue methods for optimization.
NotAvailableException
public boolean isOptimized(java.lang.reflect.Constructor constructor) throws NotAvailableException
constructor
- the Constructor to check.
NotAvailableException
- if this functionality isn't available in
this JVM.public OptimizationLevel getOptimizationLevel(java.lang.reflect.Method method) throws NotAvailableException
method
- the Method for which to return the optimization level.
NotAvailableException
- if this functionality isn't available in
this JVM.OptimizationLevel
public CodeGenerationStrategy getCodeGenerationStrategy(java.lang.reflect.Method method) throws NotAvailableException
method
- the Method for which to return the CodeGenerationStrategy.
NotAvailableException
- if this functionality isn't available in
this JVM.CodeGenerationStrategy
public OptimizationLevel getOptimizationLevel(java.lang.reflect.Constructor constructor) throws NotAvailableException
constructor
- the Constructor for which to return the optimization
level.
NotAvailableException
- if this functionality isn't available in
this JVM.OptimizationLevel
public CodeGenerationStrategy getCodeGenerationStrategy(java.lang.reflect.Constructor constructor) throws NotAvailableException
constructor
- the Constructor for which to return the
CodeGenerationStrategy.
NotAvailableException
- if this functionality isn't available in
this JVM.CodeGenerationStrategy
public boolean forceCompilation(java.lang.reflect.Method method) throws NotAvailableException
method
- the method to recompile.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean forceCompilation(java.lang.reflect.Constructor constructor) throws NotAvailableException
constructor
- the method to recompile.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean forceCompilation(java.lang.reflect.Method method, OptimizationLevel optLevel) throws NotAvailableException
method
- the Method to recompile.optLevel
- the optimization level to use when recompiling.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean forceCompilation(java.lang.reflect.Method method, CodeGenerationStrategy strategy) throws NotAvailableException
method
- the method to recompile.strategy
- the code generation strategy to use when recompiling.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean forceCompilation(java.lang.reflect.Constructor constructor, OptimizationLevel optLevel) throws NotAvailableException
constructor
- the Constructor to recompile.optLevel
- the optimization level to use when recompiling.
NotAvailableException
- if this functionality isn't available in
this JVM.public boolean forceCompilation(java.lang.reflect.Constructor constructor, CodeGenerationStrategy strategy) throws NotAvailableException
constructor
- the Constructor to recompile.strategy
- the code generation strategy to use when recompiling.
NotAvailableException
- if this functionality isn't available in
this JVM.public void addCompilationListener(CompilationListener listener) throws NotAvailableException
listener
- the listener to receive information about compiled
methods.
NotAvailableException
- if this functionality isn't available in
this JVM.public void removeCompilationListener(CompilationListener listener) throws NotAvailableException
listener
- the listener to be removed.
NotAvailableException
- if this functionality isn't available in
this JVM.public void redefineMethod(java.lang.reflect.Method method, byte[] buffer, int offset, int length) throws NotAvailableException
method
- the method to be redefined.buffer
- the byte buffer containing the bytecode for the new
version of the method.offset
- the offset to start reading from.length
- the length to read.
NotAvailableException
- if this functionality isn't available in
this JVM. This exception is currently thrown by all
JRockit versions.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |