package com.redhat.ceylon.compiler.java.metadata;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * A type parameter of a Ceylon type or method (should be contained in an
 * {@link TypeParameters @TypeParameters()}).
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({})
public @interface TypeParameter {
    
    /** The name of the type parameter */
    String value();
    
    /** 
     * String representation of the types that this type parameter is 
     * constrained to satisfy (in the {@code given ... satisfies ...} clause). 
     * May contain fully-qualified type names and type parameter names 
     */
    String[] satisfies() default {};

    /** 
     * String representation of the case types that this type parameter is 
     * constrained to be (in the {@code given ... of ...} clause). 
     * May contain fully-qualified type names and type parameter names 
     */
    String[] caseTypes() default {};

    /** The variance of this type parameter */
    Variance variance() default Variance.NONE;
}

@@ -1090,10 +1090,300 @@
 e.NONE;%0A
+    %0A    /**%0A     * The default value for this type parameter if it is optional and defaulted.%0A     * Defaults to the empty string if this type parameter is not optional. %0A     * May contain fully-qualified type names and type parameter names.%0A     */%0A    String defaultValue() default %22%22;%0A
 %7D%0A

support defaulted type parameters ceylon/ceylon-compiler#951