play.classloading
Class BytecodeCache

java.lang.Object
  extended by play.classloading.BytecodeCache

public class BytecodeCache
extends java.lang.Object

Used to speed up compilation time


Constructor Summary
BytecodeCache()
           
 
Method Summary
static void cacheBytecode(byte[] byteCode, java.lang.String name, java.lang.String source)
          Cache the bytecode
static void deleteBytecode(java.lang.String name)
          Delete the bytecode
static byte[] getBytecode(java.lang.String name, java.lang.String source)
          Retrieve the bytecode if source has not changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytecodeCache

public BytecodeCache()
Method Detail

deleteBytecode

public static void deleteBytecode(java.lang.String name)
Delete the bytecode

Parameters:
name - Cache name

getBytecode

public static byte[] getBytecode(java.lang.String name,
                                 java.lang.String source)
Retrieve the bytecode if source has not changed

Parameters:
name - The cache name
source - The source code
Returns:
The bytecode

cacheBytecode

public static void cacheBytecode(byte[] byteCode,
                                 java.lang.String name,
                                 java.lang.String source)
Cache the bytecode

Parameters:
byteCode - The bytecode
name - The cache name
source - The corresponding source


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly