Code example for WildcardType

Methods: getExtendsBoundgetSuperBound

0
      return sb;
    } 
 
    @Override public StringBuilder visitWildcard(WildcardType type, StringBuilder sb) {
      sb.append("?");
      TypeMirror extendsBound = type.getExtendsBound();
      TypeMirror superBound = type.getSuperBound();
      if (superBound != null) {
        sb.append(" super ");
        visit(superBound, sb);
      } else if (extendsBound != null) {
        sb.append(" extends ");
        visit(extendsBound, sb);
      } 
      return sb;
    } 
  } 
 
  /** 
   * Returns the name of the package that the given type is in. If the type is in the default 
Experience pair programming with AI  Get Codota for Java