001    package com.khubla.pragmatach.framework.annotation;
002    
003    import java.lang.annotation.Documented;
004    import java.lang.annotation.ElementType;
005    import java.lang.annotation.Inherited;
006    import java.lang.annotation.Retention;
007    import java.lang.annotation.RetentionPolicy;
008    import java.lang.annotation.Target;
009    
010    /**
011     * @author tome
012     * 
013     *         <pre>
014     * Routes are of the syntax /a/b/c/d. 
015     * If a part is wrapped in {} it's a dynamic part.
016     * The dynamic part consists of an optional regex followed by @ followed by a name.
017     * </pre>
018     */
019    @Documented
020    @Target({ ElementType.METHOD })
021    @Retention(RetentionPolicy.RUNTIME)
022    @Inherited
023    public @interface Route {
024       public enum HttpMethod {
025          get, post;
026       }
027    
028       HttpMethod method() default HttpMethod.get;
029    
030       String uri() default "";
031    }