package type;

/**
 * A Java wildcard type. For example:
 * <pre>
 *   ?
 *   ? extends Object
 *   ? super String
 * </pre>
 */
public class WildcardType extends Type {

    /**
     * The possible wildcard bound kinds.
     */
    public enum BoundKind {
        NONE,
        EXTENDS,
        SUPER;

        /**
         * Gets this bound kind in a format that can be inserted into source
         * code (except if this bound kind is {@code NONE}).
         */
        @Override
        public String toString() {
            return super.toString().toLowerCase();
        }
    }

    /**
     * The name of the type argument. For example, 'K' in:
     * <pre>
     *   public class ClassName&lt;K extends Object&gt;
     * </pre>
     */
    private String typeArgumentName;

    /**
     * The bound kind of this wildcard. {@code NONE} if there is no bound.
     */
    private BoundKind kind;

    /**
     * The bound of this wildcard. {@code null} if there is none.
     */
    private Type bound;

    /**
     * Creates a new wildcard type with no bound.
     */
    public WildcardType() {
        this(BoundKind.NONE, null);
    }

    /**
     * Creates a new wildcard type.
     * @param kind the bound kind.
     * @param bound the bound.
     */
    public WildcardType(BoundKind kind, Type bound) {
        super();
        this.typeArgumentName = "?";
        this.kind = kind;
        this.bound = bound;
    }

    /**
     * Creates a new wildcard type.
     * @param typeArgumentName the name of the type argument.
     * @param kind the bound kind.
     * @param bound the bound.
     */
    public WildcardType(String typeArgumentName, BoundKind kind, Type bound) {
        super();
        this.typeArgumentName = typeArgumentName;
        this.kind = kind;
        this.bound = bound;
    }

    /**
     * Gets the name of the type argument. For example, 'K' in:
     * <pre>
     *   public class ClassName&lt;K extends Object&gt;
     * </pre>
     * @return the name of the type argument.
     */
    public String getTypeArgumentName() {
        return typeArgumentName;
    }

    /**
     * Gets the bound of this wildcard or {@code null} if there is none.
     * @return the bound or {@code null}.
     */
    public Type getBound() {
        return bound;
    }

    /**
     * Gets the bound kind of this wildcard ({@code NONE} if there is none).
     * @return the bound kind.
     */
    public BoundKind getKind() {
        return kind;
    }
}

@@ -118,20 +118,86 @@
  %3C/pre%3E%0A
+ * This can also be used with generic type arguments with bounds.%0A
  */%0A
-
 public c
@@ -792,24 +792,48 @@
    * %3C/pre%3E%0A
+     * Can also be '?'.%0A
      */%0A    
@@ -1200,16 +1200,21 @@
    this(
+%22?%22, 
 BoundKin
@@ -1239,295 +1239,8 @@
  %7D%0A%0A
-    /**%0A     * Creates a new wildcard type.%0A     * @param kind the bound kind.%0A     * @param bound the bound.%0A     */%0A    public WildcardType(BoundKind kind, Type bound) %7B%0A        super();%0A        this.typeArgumentName = %22?%22;%0A        this.kind = kind;%0A        this.bound = bound;%0A    %7D%0A%0A
     
@@ -1755,32 +1755,32 @@
 ends Object&gt;%0A
-
      * %3C/pre%3E%0A  
@@ -1773,24 +1773,48 @@
    * %3C/pre%3E%0A
+     * Can also be '?'.%0A
      * @retu

Remove unnecessary constructor and improve documentation.