public final class Compiler extends Object
Compiler
类以支持java本地代码的编译器和相关服务。在设计上,该
Compiler
类没有;它作为JIT编译器实现中的占位符。
当java虚拟机第一次启动时,它决定了系统的性能java.compiler
存在。(系统属性都可以通过System.getProperty(String)
和System.getProperty(String, String)
。如果是这样的话,它被认为是一个库的名称(与平台相关的确切位置和类型);System.loadLibrary(java.lang.String)
叫做加载库。如果加载成功,在图书馆命名为java_lang_Compiler_start()
调用函数。
如果没有可用的编译器,这些方法就什么都不做了。
public static boolean compileClass(类<?> clazz)
clazz
-一级
true
如果编译成功;
false
如果编译失败或没有可用的编译器
null
clazz
NullPointerException
public static boolean compileClasses(String string)
string
-类的名称来编译
true
如果编译成功;
false
如果编译失败或没有可用的编译器
null
string
NullPointerException
public static Object command(Object any)
any
-争论
null
如果没有可用的编译器
null
any
NullPointerException
public static void enable()
public static void disable()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.