类 CacheableJdkCompiler

java.lang.Object
com.baidu.bjf.remoting.protobuf.utils.compiler.CacheableJdkCompiler
所有已实现的接口:
Compiler

public abstract class CacheableJdkCompiler extends Object implements Compiler
Cacheable support compiler.
从以下版本开始:
1.8.6
作者:
xiemalin
  • 字段详细资料

    • compiler

      protected Compiler compiler
      The compiler.
  • 构造器详细资料

    • CacheableJdkCompiler

      public CacheableJdkCompiler(Compiler compiler)
      Instantiates a new cacheable jdk compiler.
      参数:
      compiler - the compiler
  • 方法详细资料

    • compile

      public Class<?> compile(String className, String code, ClassLoader classLoader, OutputStream os, long timestamp)
      从接口复制的说明: Compiler
      do compile java source.
      指定者:
      compile 在接口中 Compiler
      code - Java source code
      classLoader - current classloader
      os - target output compiled byte code
      timestamp - time stamp of class file
      返回:
      Compiled class
    • cached

      protected abstract byte[] cached(String className, long timestamp)
      Cached.
      参数:
      className - the class name
      timestamp - the timestamp
      返回:
      the byte[]
    • cache

      protected abstract void cache(String className, byte[] bytes, long timestamp)
      Cache.
      参数:
      className - the class name
      bytes - the bytes
      timestamp - the timestamp