gpt4 book ai didi

com.sun.mirror.type.WildcardType.getUpperBounds()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 00:11:05 25 4
gpt4 key购买 nike

本文整理了Java中com.sun.mirror.type.WildcardType.getUpperBounds()方法的一些代码示例,展示了WildcardType.getUpperBounds()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WildcardType.getUpperBounds()方法的具体详情如下:
包路径:com.sun.mirror.type.WildcardType
类名称:WildcardType
方法名:getUpperBounds

WildcardType.getUpperBounds介绍

暂无

代码示例

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

public void visitWildcardType(WildcardType wildcardType) {
  Iterator<ReferenceType> upperBounds = wildcardType.getUpperBounds().iterator();
  if (upperBounds.hasNext()) {
   upperBounds.next().accept(this);
  }
 }
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

public void visitWildcardType(WildcardType wildcardType) {
 Iterator<ReferenceType> upperBounds = wildcardType.getUpperBounds().iterator();
 if (!upperBounds.hasNext()) {
  this.xmlType = KnownXmlType.ANY_TYPE;
 }
 else {
  upperBounds.next().accept(this);
  if (this.errorMessage != null) {
   this.errorMessage = "Problem with wildcard bounds: " + this.errorMessage;
  }
 }
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

public void visitWildcardType(WildcardType wildcardType) {
 Iterator<ReferenceType> upperBounds = wildcardType.getUpperBounds().iterator();
 if (!upperBounds.hasNext()) {
  this.xmlType = KnownXmlType.ANY_TYPE;
 }
 else {
  upperBounds.next().accept(this);
  if (this.errorMessage != null) {
   this.errorMessage = "Problem with wildcard bounds: " + this.errorMessage;
  }
 }
}

代码示例来源:origin: net.sf.apt-jelly/apt-jelly-core

public Collection<ReferenceType> getUpperBounds() {
 return TypeMirrorDecorator.decorate(((WildcardType)delegate).getUpperBounds());
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-csharp

protected String getCollectionTypeConversion(DeclaredType declaredType) throws TemplateModelException {
 Collection<TypeMirror> actualTypeArguments = declaredType.getActualTypeArguments();
 if (actualTypeArguments.size() == 1) {
  TypeMirror typeArg = actualTypeArguments.iterator().next();
  if (typeArg instanceof WildcardType) {
   WildcardType wildcardType = (WildcardType) typeArg;
   if (wildcardType.getUpperBounds() == null || wildcardType.getUpperBounds().isEmpty()) {
    return "global::System.Collections.ArrayList";
   }
   else {
    return "global::System.Collections.Generic.List<" + convert(wildcardType.getUpperBounds().iterator().next()) + ">";
   }
  }
  else if (typeArg instanceof TypeVariable) {
   Collection<ReferenceType> bounds = ((TypeVariable) typeArg).getDeclaration().getBounds();
   if (bounds == null || bounds.isEmpty()) {
    return "global::System.Collections.ArrayList";
   }
   else {
    return "global::System.Collections.Generic.List<" + convert(bounds.iterator().next()) + ">";
   }
  }
  else {
   return "global::System.Collections.Generic.List<" + convert(typeArg) + ">";
  }
 }
 else {
  return "global::System.Collections.ArrayList";
 }
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

conversion = "? super " + convert(wildCard.getLowerBounds().iterator().next());
else if (wildCard.getUpperBounds() != null && !wildCard.getUpperBounds().isEmpty()) {
 conversion = "? extends " + convert(wildCard.getUpperBounds().iterator().next());

代码示例来源:origin: org.codehaus.enunciate/enunciate-c

if (typeArg instanceof WildcardType) {
 WildcardType wildcardType = (WildcardType) typeArg;
 if (wildcardType.getUpperBounds() != null && !wildcardType.getUpperBounds().isEmpty()) {
  typeArg = wildcardType.getUpperBounds().iterator().next();

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com