/*
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */

package net.ranides.test.mockup.reflection;

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

/**
 *
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 */
public final class ForAnnotationUtils {
    
    private ForAnnotationUtils() {
        /* utility class */
    }

    @Retention(RetentionPolicy.RUNTIME)
    public @interface MethodInfo {
        
        String name();
        
        String author();
        
        Class<?> type() default Integer.class;
        
        int uid() default 77;
        
        API api();
        
    }
    
    public enum API {
        ANSI, JAVA, GNU
    }
    
    @MethodInfo(name="m1", author="ranides", api=API.GNU)
    public static void m1() {
        
    }

    @Documented
    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    public @interface WsAction {
        /**
         * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code input}
         * message of the operation.
         */
        String input() default "";

        /**
         * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code output}
         * message of the operation.
         */
        String output() default "";

        /**
         * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code fault}
         * message(s) of the operation. Each exception that is mapped to a fault and requires an explicit WS-Addressing
         * {@code Action} message addressing property, needs to be specified as a value in this property
         * using {@link WsFaultAction} annotation.
         */
        WsFaultAction[] fault() default { };
    }

    @Documented
    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    public @interface WsFaultAction {
        /**
         * Name of the exception class
         */
        Class<? extends Exception> className();

        /**
         * Value of WS-Addressing {@code Action} message addressing property for the exception
         */
        String value() default "";
    }
    
}
