本文整理汇总了Java中com.sun.tools.javac.comp.Check类的典型用法代码示例。如果您正苦于以下问题:Java Check类的具体用法?Java Check怎么用?Java Check使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Check类属于com.sun.tools.javac.comp包,在下文中一共展示了Check类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DocEnv
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
protected DocEnv(Context context) {
context.put(docEnvKey, this);
this.context = context;
messager = Messager.instance0(context);
syms = Symtab.instance(context);
reader = JavadocClassReader.instance0(context);
enter = JavadocEnter.instance0(context);
names = Names.instance(context);
externalizableSym = reader.enterClass(names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = Types.instance(context);
fileManager = context.get(JavaFileManager.class);
if (fileManager instanceof JavacFileManager) {
((JavacFileManager)fileManager).setSymbolFileEnabled(false);
}
// Default. Should normally be reset with setLocale.
this.doclocale = new DocLocale(this, "", breakiterator);
source = Source.instance(context);
}
示例2: Types
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
protected Types(Context context) {
context.put(typesKey, this);
syms = Symtab.instance(context);
names = Names.instance(context);
Source source = Source.instance(context);
allowBoxing = source.allowBoxing();
allowCovariantReturns = source.allowCovariantReturns();
allowObjectToPrimitiveCast = source.allowObjectToPrimitiveCast();
reader = ClassReader.instance(context);
chk = Check.instance(context);
enter = Enter.instance(context);
capturedName = names.fromString("<captured wildcard>");
messages = JavacMessages.instance(context);
diags = JCDiagnostic.Factory.instance(context);
functionDescriptorLookupError = new FunctionDescriptorLookupError();
noWarnings = new Warner(null);
}
示例3: Types
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
protected Types(Context context) {
context.put(typesKey, this);
syms = Symtab.instance(context);
names = Names.instance(context);
Source source = Source.instance(context);
allowObjectToPrimitiveCast = source.allowObjectToPrimitiveCast();
allowDefaultMethods = source.allowDefaultMethods();
mapCapturesToBounds = source.mapCapturesToBounds();
chk = Check.instance(context);
enter = Enter.instance(context);
capturedName = names.fromString("<captured wildcard>");
messages = JavacMessages.instance(context);
diags = JCDiagnostic.Factory.instance(context);
functionDescriptorLookupError = new FunctionDescriptorLookupError();
noWarnings = new Warner(null);
}
示例4: ToolEnvironment
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
protected ToolEnvironment(Context context) {
context.put(ToolEnvKey, this);
this.context = context;
messager = Messager.instance0(context);
syms = Symtab.instance(context);
finder = JavadocClassFinder.instance(context);
enter = JavadocEnter.instance(context);
names = Names.instance(context);
externalizableSym = syms.enterClass(syms.java_base, names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = com.sun.tools.javac.code.Types.instance(context);
fileManager = context.get(JavaFileManager.class);
if (fileManager instanceof JavacFileManager) {
((JavacFileManager)fileManager).setSymbolFileEnabled(false);
}
docTrees = JavacTrees.instance(context);
source = Source.instance(context);
elements = JavacElements.instance(context);
typeutils = JavacTypes.instance(context);
elementToTreePath = new HashMap<>();
}
示例5: DocEnv
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
protected DocEnv(Context context) {
context.put(docEnvKey, this);
this.context = context;
messager = Messager.instance0(context);
syms = Symtab.instance(context);
finder = JavadocClassFinder.instance(context);
enter = JavadocEnter.instance(context);
names = Names.instance(context);
externalizableSym = syms.enterClass(syms.java_base, names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = Types.instance(context);
fileManager = context.get(JavaFileManager.class);
if (fileManager instanceof JavacFileManager) {
((JavacFileManager)fileManager).setSymbolFileEnabled(false);
}
// Default. Should normally be reset with setLocale.
this.doclocale = new DocLocale(this, "", breakiterator);
source = Source.instance(context);
}
示例6: clear
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
void clear() {
drop(Arguments.argsKey);
drop(DiagnosticListener.class);
drop(Log.outKey);
drop(Log.errKey);
drop(JavaFileManager.class);
drop(JavacTask.class);
if (ht.get(Log.logKey) instanceof ReusableLog) {
//log already inited - not first round
((ReusableLog)Log.instance(this)).clear();
Enter.instance(this).newRound();
((ReusableJavaCompiler)ReusableJavaCompiler.instance(this)).clear();
Types.instance(this).newRound();
Check.instance(this).newRound();
Modules.instance(this).newRound();
Annotate.instance(this).newRound();
CompileStates.instance(this).clear();
MultiTaskListener.instance(this).clear();
//find if any of the roots have redefined java.* classes
Symtab syms = Symtab.instance(this);
pollutionScanner.scan(roots, syms);
roots.clear();
}
}
示例7: DocEnv
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
protected DocEnv(Context context) {
context.put(docEnvKey, this);
this.context = context;
messager = Messager.instance0(context);
syms = Symtab.instance(context);
finder = JavadocClassFinder.instance(context);
enter = JavadocEnter.instance(context);
names = Names.instance(context);
externalizableSym = syms.enterClass(syms.java_base, names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = com.sun.tools.javac.code.Types.instance(context);
fileManager = context.get(JavaFileManager.class);
if (fileManager instanceof JavacFileManager) {
((JavacFileManager)fileManager).setSymbolFileEnabled(false);
}
docTrees = JavacTrees.instance(context);
source = Source.instance(context);
elements = JavacElements.instance(context);
typeutils = JavacTypes.instance(context);
elementToTreePath = new HashMap<>();
}
示例8: clear
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
void clear() {
drop(Arguments.argsKey);
drop(DiagnosticListener.class);
drop(Log.outKey);
drop(JavaFileManager.class);
drop(JavacTask.class);
if (ht.get(Log.logKey) instanceof ReusableLog) {
//log already inited - not first round
((ReusableLog)Log.instance(this)).clear();
Enter.instance(this).newRound();
((ReusableJavaCompiler)ReusableJavaCompiler.instance(this)).clear();
Types.instance(this).newRound();
Check.instance(this).newRound();
CompileStates.instance(this).clear();
MultiTaskListener.instance(this).clear();
//find if any of the roots have redefined java.* classes
Symtab syms = Symtab.instance(this);
pollutionScanner.scan(roots, syms);
roots.clear();
}
}
示例9: Types
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
protected Types(Context context) {
context.put(typesKey, this);
syms = Symtab.instance(context);
names = Names.instance(context);
Source source = Source.instance(context);
allowBoxing = source.allowBoxing();
allowCovariantReturns = source.allowCovariantReturns();
allowObjectToPrimitiveCast = source.allowObjectToPrimitiveCast();
allowDefaultMethods = source.allowDefaultMethods();
reader = ClassReader.instance(context);
chk = Check.instance(context);
enter = Enter.instance(context);
capturedName = names.fromString("<captured wildcard>");
messages = JavacMessages.instance(context);
diags = JCDiagnostic.Factory.instance(context);
functionDescriptorLookupError = new FunctionDescriptorLookupError();
noWarnings = new Warner(null);
}
示例10: DocEnv
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
private DocEnv(Context context) {
context.put(docEnvKey, this);
messager = Messager.instance0(context);
syms = Symtab.instance(context);
reader = JavadocClassReader.instance0(context);
enter = JavadocEnter.instance0(context);
attr = Attr.instance(context);
names = Name.Table.instance(context);
externalizableSym = reader.enterClass(names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = Types.instance(context);
// Default. Should normally be reset with setLocale.
this.doclocale = new DocLocale(this, "", breakiterator);
}
示例11: DocEnv
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
private DocEnv(Context context) {
context.put(docEnvKey, this);
messager = Messager.instance0(context);
syms = Symtab.instance(context);
reader = JavadocClassReader.instance0(context);
enter = JavadocEnter.instance0(context);
names = Names.instance(context);
externalizableSym = reader.enterClass(names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = Types.instance(context);
fileManager = context.get(JavaFileManager.class);
// Default. Should normally be reset with setLocale.
this.doclocale = new DocLocale(this, "", breakiterator);
}
示例12: DocEnv
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
protected DocEnv(Context context) {
context.put(docEnvKey, this);
messager = Messager.instance0(context);
syms = Symtab.instance(context);
reader = JavadocClassReader.instance0(context);
enter = JavadocEnter.instance0(context);
names = Names.instance(context);
externalizableSym = reader.enterClass(names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = Types.instance(context);
fileManager = context.get(JavaFileManager.class);
// Default. Should normally be reset with setLocale.
this.doclocale = new DocLocale(this, "", breakiterator);
}
示例13: DocEnv
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
private DocEnv(Context context) {
context.put(docEnvKey, this);
messager = Messager.instance0(context);
syms = Symtab.instance(context);
reader = JavadocClassReader.instance0(context);
enter = JavadocEnter.instance0(context);
names = Name.Table.instance(context);
externalizableSym = reader.enterClass(names.fromString("java.io.Externalizable"));
chk = Check.instance(context);
types = Types.instance(context);
fileManager = context.get(JavaFileManager.class);
// Default. Should normally be reset with setLocale.
this.doclocale = new DocLocale(this, "", breakiterator);
}
示例14: checkTypesAssignable
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
public static boolean checkTypesAssignable(CompilationInfo info, TypeMirror from, TypeMirror to) {
Context c = ((JavacTaskImpl) info.impl.getJavacTask()).getContext();
if (from.getKind() == TypeKind.TYPEVAR) {
Types types = Types.instance(c);
TypeVar t = types.substBound((TypeVar)from, com.sun.tools.javac.util.List.of((Type)from), com.sun.tools.javac.util.List.of(types.boxedTypeOrType((Type)to)));
return info.getTypes().isAssignable(t.getUpperBound(), to)
|| info.getTypes().isAssignable(to, t.getUpperBound());
}
if (from.getKind() == TypeKind.WILDCARD) {
from = Types.instance(c).wildUpperBound((Type)from);
}
return Check.instance(c).checkType(null, (Type)from, (Type)to).getKind() != TypeKind.ERROR;
}
示例15: Types
import com.sun.tools.javac.comp.Check; //导入依赖的package包/类
protected Types(Context context) {
context.put(typesKey, this);
syms = Symtab.instance(context);
names = Names.instance(context);
Source source = Source.instance(context);
allowBoxing = source.allowBoxing();
allowCovariantReturns = source.allowCovariantReturns();
allowObjectToPrimitiveCast = source.allowObjectToPrimitiveCast();
reader = ClassReader.instance(context);
chk = Check.instance(context);
capturedName = names.fromString("<captured wildcard>");
messages = JavacMessages.instance(context);
}