本文整理汇总了Java中com.sun.tools.javac.file.JavacFileManager.isDefaultBootClassPath方法的典型用法代码示例。如果您正苦于以下问题:Java JavacFileManager.isDefaultBootClassPath方法的具体用法?Java JavacFileManager.isDefaultBootClassPath怎么用?Java JavacFileManager.isDefaultBootClassPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.javac.file.JavacFileManager
的用法示例。
在下文中一共展示了JavacFileManager.isDefaultBootClassPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ClassFinder
import com.sun.tools.javac.file.JavacFileManager; //导入方法依赖的package包/类
/** Construct a new class finder. */
protected ClassFinder(Context context) {
context.put(classFinderKey, this);
reader = ClassReader.instance(context);
names = Names.instance(context);
syms = Symtab.instance(context);
fileManager = context.get(JavaFileManager.class);
dependencies = Dependencies.instance(context);
if (fileManager == null)
throw new AssertionError("FileManager initialization error");
diagFactory = JCDiagnostic.Factory.instance(context);
log = Log.instance(context);
annotate = Annotate.instance(context);
Options options = Options.instance(context);
verbose = options.isSet(Option.VERBOSE);
cacheCompletionFailure = options.isUnset("dev");
preferSource = "source".equals(options.get("-Xprefer"));
userPathsFirst = options.isSet(Option.XXUSERPATHSFIRST);
allowSigFiles = context.get(PlatformDescription.class) != null;
completionFailureName =
options.isSet("failcomplete")
? names.fromString(options.get("failcomplete"))
: null;
// Temporary, until more info is available from the module system.
boolean useCtProps;
JavaFileManager fm = context.get(JavaFileManager.class);
if (fm instanceof JavacFileManager) {
JavacFileManager jfm = (JavacFileManager) fm;
useCtProps = jfm.isDefaultBootClassPath() && jfm.isSymbolFileEnabled();
} else if (fm.getClass().getName().equals("com.sun.tools.sjavac.comp.SmartFileManager")) {
useCtProps = !options.isSet("ignore.symbol.file");
} else {
useCtProps = false;
}
jrtIndex = useCtProps && JRTIndex.isAvailable() ? JRTIndex.getSharedInstance() : null;
profile = Profile.instance(context);
}
示例2: ClassFinder
import com.sun.tools.javac.file.JavacFileManager; //导入方法依赖的package包/类
/** Construct a new class finder. */
protected ClassFinder(Context context) {
context.put(classFinderKey, this);
reader = ClassReader.instance(context);
names = Names.instance(context);
syms = Symtab.instance(context);
fileManager = context.get(JavaFileManager.class);
dependencies = Dependencies.instance(context);
if (fileManager == null)
throw new AssertionError("FileManager initialization error");
diagFactory = JCDiagnostic.Factory.instance(context);
log = Log.instance(context);
annotate = Annotate.instance(context);
Options options = Options.instance(context);
verbose = options.isSet(VERBOSE);
cacheCompletionFailure = options.isUnset("dev");
preferSource = "source".equals(options.get("-Xprefer"));
userPathsFirst = options.isSet(XXUSERPATHSFIRST);
allowSigFiles = context.get(PlatformDescription.class) != null;
completionFailureName =
options.isSet("failcomplete")
? names.fromString(options.get("failcomplete"))
: null;
moduleOverride = options.isSet(XMODULE) ? names.fromString(options.get(XMODULE))
: null;
// Temporary, until more info is available from the module system.
boolean useCtProps;
JavaFileManager fm = context.get(JavaFileManager.class);
if (fm instanceof JavacFileManager) {
JavacFileManager jfm = (JavacFileManager) fm;
useCtProps = jfm.isDefaultBootClassPath() && jfm.isSymbolFileEnabled();
} else if (fm.getClass().getName().equals("com.sun.tools.sjavac.comp.SmartFileManager")) {
useCtProps = !options.isSet("ignore.symbol.file");
} else {
useCtProps = false;
}
jrtIndex = useCtProps && JRTIndex.isAvailable() ? JRTIndex.getSharedInstance() : null;
profile = Profile.instance(context);
}