router.fu.annotations.RouteCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of router-fu-annotations Show documentation
Show all versions of router-fu-annotations Show documentation
Annotations for defining a router
package router.fu.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import javax.annotation.Nonnull;
/**
* Marks a method as custom implementation of callback hook.
* The method must return a router.fu.MatchResult and may accept up to three parameters:
*
*
* - String parameter: Identifies the location matched.
* - router.fu.Route parameter: Identifies the route matched.
* - Map<router.fu.Parameter, String> parameter: Identifies the parameters extracted during match.
*
*/
@Documented
@Target( ElementType.METHOD )
public @interface RouteCallback
{
/**
* The name of the route that this is custom callback for.
* If name is unspecified then the name of the method is assumed to be of the form
* "[name]Callback" and can be derived.
*
* @return the name of associated route.
*/
@Nonnull
String name() default "";
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy