本文整理汇总了Java中org.eclipse.jdt.internal.compiler.impl.ITypeRequestor类的典型用法代码示例。如果您正苦于以下问题:Java ITypeRequestor类的具体用法?Java ITypeRequestor怎么用?Java ITypeRequestor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ITypeRequestor类属于org.eclipse.jdt.internal.compiler.impl包,在下文中一共展示了ITypeRequestor类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LookupEnvironment
import org.eclipse.jdt.internal.compiler.impl.ITypeRequestor; //导入依赖的package包/类
public LookupEnvironment(ITypeRequestor typeRequestor, CompilerOptions globalOptions, ProblemReporter problemReporter, INameEnvironment nameEnvironment) {
this.typeRequestor = typeRequestor;
this.globalOptions = globalOptions;
this.problemReporter = problemReporter;
this.defaultPackage = new PackageBinding(this); // assume the default package always exists
this.defaultImports = null;
this.nameEnvironment = nameEnvironment;
this.knownPackages = new HashtableOfPackage();
this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
this.missingTypes = null;
this.accessRestrictions = new HashMap(3);
this.classFilePool = ClassFilePool.newInstance();
this.typesBeingConnected = new HashSet();
this.typeSystem = this.globalOptions.sourceLevel >= ClassFileConstants.JDK1_8 && this.globalOptions.storeAnnotations ? new AnnotatableTypeSystem(this) : new TypeSystem(this);
}
示例2: LookupEnvironment
import org.eclipse.jdt.internal.compiler.impl.ITypeRequestor; //导入依赖的package包/类
public LookupEnvironment(ITypeRequestor typeRequestor, CompilerOptions globalOptions, ProblemReporter problemReporter, INameEnvironment nameEnvironment) {
this.typeRequestor = typeRequestor;
this.globalOptions = globalOptions;
this.problemReporter = problemReporter;
this.defaultPackage = new PackageBinding(this); // assume the default package always exists
this.defaultImports = null;
this.nameEnvironment = nameEnvironment;
this.knownPackages = new HashtableOfPackage();
this.uniqueArrayBindings = new ArrayBinding[5][];
this.uniqueArrayBindings[0] = new ArrayBinding[50]; // start off the most common 1 dimension array @ 50
this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
this.uniqueRawTypeBindings = new SimpleLookupTable(3);
this.uniqueWildcardBindings = new SimpleLookupTable(3);
this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
this.missingTypes = null;
this.accessRestrictions = new HashMap(3);
this.classFilePool = ClassFilePool.newInstance();
this.typesBeingConnected = new HashSet();
}
示例3: handleAnnotationOnBuildFieldsAndMethods
import org.eclipse.jdt.internal.compiler.impl.ITypeRequestor; //导入依赖的package包/类
public void handleAnnotationOnBuildFieldsAndMethods(EclipseNode typeNode, org.eclipse.jdt.internal.compiler.ast.Annotation annotation) {
TypeDeclaration decl = (TypeDeclaration) typeNode.get();
TypeBinding tb = resolveAnnotation(decl, annotation);
if (tb == null) return;
AnnotationHandlerContainer<?> container = annotationHandlers.get(new String(tb.readableName()));
if (container == null) return;
EclipseNode annotationNode = typeNode.getAst().get(annotation);
if (annotationNode == null) {
return;
}
if (isMethodAnnotation(annotationNode) && !typeNode.isCompleteParse() && (decl.scope != null)) {
final CompilationUnitScope cus = decl.scope.compilationUnitScope();
final ITypeRequestor typeRequestor = cus.environment().typeRequestor;
if (typeRequestor instanceof org.eclipse.jdt.internal.compiler.Compiler) {
final org.eclipse.jdt.internal.compiler.Compiler c = (org.eclipse.jdt.internal.compiler.Compiler) typeRequestor;
try {
c.parser.getMethodBodies(cus.referenceContext);
typeNode.rebuild();
} catch (Exception e) {
// better break here
}
}
}
try {
if (checkAndSetHandled(annotation)) container.handle(annotation, annotationNode);
} catch (AnnotationValueDecodeFail fail) {
fail.owner.setError(fail.getMessage(), fail.idx);
}
}