本文整理汇总了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;
}
示例2: endVisit
import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public void endVisit(WildcardType node) {
if (skipNode(node)) {
return;
}
assignFlowInfo(node, node.getBound());
}
示例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;
}
示例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;
}
示例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;
}
示例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;*/
}
示例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;
}
示例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);
}
示例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);
}
示例10: visit
import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(final WildcardType node) {
return false;
}
示例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;
}
示例12: endVisit
import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public void endVisit(WildcardType node) {
if (skipNode(node))
return;
assignFlowInfo(node, node.getBound());
}
示例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);
}
示例14: endVisit
import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public void endVisit(WildcardType node) {
endVisitNode(node);
}
示例15: visit
import org.eclipse.jdt.core.dom.WildcardType; //导入依赖的package包/类
@Override
public boolean visit(WildcardType node) {
return visitNode(node);
}