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


Java WildcardType类代码示例

本文整理汇总了Java中org.eclipse.jdt.core.dom.WildcardType的典型用法代码示例。如果您正苦于以下问题:Java WildcardType类的具体用法?Java WildcardType怎么用?Java WildcardType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WildcardType类属于org.eclipse.jdt.core.dom包,在下文中一共展示了WildcardType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: tryToResolve

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
protected boolean tryToResolve(Type type) {
	boolean result = false;

	if (underResolution.getResolverMap().containsKey(type)) {
		result = true;
	} else {
		if (type.isPrimitiveType()) {
			result = tryToResolve((PrimitiveType)type);
		} else if (type.isQualifiedType()) {
			result = tryToResolve((QualifiedType)type);
		} else if (type.isArrayType()) {
			result = tryToResolve(((ArrayType)type).getElementType());
		} else if (type.isSimpleType()) {
			result = tryToResolve((SimpleType)type);
		} else if (type.isParameterizedType()) {
			result = tryToResolve((ParameterizedType)type);
		} else if (type.isWildcardType()) {
			result = tryToResolve((WildcardType)type);
		} else {
			CoreActivator.log(IStatus.INFO, "Type not handled " + type.toString());
		}
	}
	return result;
}
 
开发者ID:hmarchadour,项目名称:2uml,代码行数:25,代码来源:ResolverImpl.java

示例2: endVisit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public void endVisit(WildcardType node) {
	if (skipNode(node)) {
		return;
	}
	assignFlowInfo(node, node.getBound());
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:8,代码来源:FlowAnalyzer.java

示例3: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(WildcardType node) {
	this.fBuffer.append("?");//$NON-NLS-1$
	Type bound= node.getBound();
	if (bound != null) {
		if (node.isUpperBound()) {
			this.fBuffer.append(" extends ");//$NON-NLS-1$
		} else {
			this.fBuffer.append(" super ");//$NON-NLS-1$
		}
		bound.accept(this);
	}
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:15,代码来源:ASTFlattener.java

示例4: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
public boolean visit(WildcardType node) {
	this.buffer.append("?");//$NON-NLS-1$
	Type bound = node.getBound();
	if (bound != null) {
		if (node.isUpperBound()) {
			this.buffer.append(" extends ");//$NON-NLS-1$
		} else {
			this.buffer.append(" super ");//$NON-NLS-1$
		}
		bound.accept(this);
	}
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:14,代码来源:NaiveASTFlattener.java

示例5: getBindingForWildCardType

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
public Binding getBindingForWildCardType(final WildcardType type) {
	Binding result = null;
	ITypeBinding binding = type.resolveBinding();
	if (binding == null) {
		if (this.logJDTBindingsIssues) {
			MoDiscoLogger.logWarning("*** WARNING : binding '" //$NON-NLS-1$
					+ type.toString() + "' unresolved.", JavaActivator //$NON-NLS-1$
					.getDefault());
		}
		result = new UnresolvedBinding(type.toString());
	} else {
		result = new Binding(binding.getQualifiedName());
	}
	return result;
}
 
开发者ID:markus1978,项目名称:srcrepo,代码行数:16,代码来源:JDTDelegateBindingFactory.java

示例6: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(WildcardType node) {
	//System.out.println("Found: " + node.getClass() + " " + node);
	//println();
	ASTNode parent = node.getParent();
	while (parent instanceof ParameterizedType) {
		parent = parent.getParent();
	}
	//if (parent instanceof FieldDeclaration) {
		print("JavaObject");
		return false;
	//}
	/*String ident = genId();
	additionalTemplateParams.add(ident);
	
	print(ident);
	if (node.getBound() != null) {
		StringWriter sw = new StringWriter();
		pushWriter(sw);
		node.getBound().accept(this);
		popWriter();
		String append;
		if (node.isUpperBound()) {
			append =  "is(" + ident + " : " + sw + ")";
		} else {
			append = "is(" + sw + " : " + ident + ")";
		}
		if (constraints.length() > 0) {
			constraints += " && " + append;
		} else {
			constraints = append;
		}
	}
	return false;*/
}
 
开发者ID:mrmonday,项目名称:j2d,代码行数:36,代码来源:J2dVisitor.java

示例7: getRootClassifier

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public Classifier getRootClassifier() {
	Classifier rootClassifier;
	if (rootType.isParameterizedType()) {
		// TODO enhance this
		rootClassifier = resolverMap.get(((ParameterizedType)rootType).getType());
	} else if (rootType.isArrayType()) {
		rootClassifier = resolverMap.get(((ArrayType)rootType).getElementType());
	} else if (rootType.isWildcardType()) {
		rootClassifier = resolverMap.get(((WildcardType)rootType).getBound());
	} else {
		rootClassifier = resolverMap.get(rootType);
	}
	return rootClassifier;
}
 
开发者ID:hmarchadour,项目名称:2uml,代码行数:16,代码来源:ResolverResultImpl.java

示例8: endVisit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void endVisit(WildcardType node) {
	logger.warn("Method endVisitWildcardType for " + node + " for " + node + " not implemented!");
	super.endVisit(node);
}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:7,代码来源:LoggingVisitor.java

示例9: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean visit(WildcardType node) {
	logger.warn("Method visitWildcardType for " + node + " not implemented!");
	return super.visit(node);
}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:7,代码来源:LoggingVisitor.java

示例10: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(final WildcardType node) {
	return false;
}
 
开发者ID:Beagle-PSE,项目名称:Beagle,代码行数:5,代码来源:NotRecursingAstVisitor.java

示例11: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(final WildcardType node) {
	// not instrumentable, contains no instrumentable nodes
	return false;
}
 
开发者ID:Beagle-PSE,项目名称:Beagle,代码行数:6,代码来源:InstrumentableAstNodeLister.java

示例12: endVisit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public void endVisit(WildcardType node) {
	if (skipNode(node))
		return;
	assignFlowInfo(node, node.getBound());
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:FlowAnalyzer.java

示例13: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(WildcardType node) {
	if (node.subtreeMatch(fMatcher, fNodeToMatch))
		return matches(node);
	return super.visit(node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:AstMatchingNodeFinder.java

示例14: endVisit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public void endVisit(WildcardType node) {
	endVisitNode(node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:GenericVisitor.java

示例15: visit

import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(WildcardType node) {
	return visitNode(node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:GenericVisitor.java


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