当前位置: 首页>>代码示例>>Java>>正文


Java ITypeRequestor类代码示例

本文整理汇总了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);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:LookupEnvironment.java

示例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();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:21,代码来源:LookupEnvironment.java

示例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);
	}
}
 
开发者ID:redundent,项目名称:lombok,代码行数:31,代码来源:HandlerLibrary.java


注:本文中的org.eclipse.jdt.internal.compiler.impl.ITypeRequestor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。