Reply To: Rewrite Annotations

Splash Forums Rewrite Users Rewrite Annotations Reply To: Rewrite Annotations


So.. the way combining annotations works is this (as far as I know… Christian did most of the work on annotations; I just refined the API:)

Order of annotation processing:

  1. Class
  2. Method
  3. Parameter

Each handler is provided a Context variable:

public void process(ClassContext context, Join annotation, HandlerChain chain)
public void process(MethodContext context, URLAction annotation, HandlerChain chain)
public void process(ParameterContext context, Param annotation, HandlerChain chain)

As you can see here, each sub-context also has access to the parent contexts:

Additionally, you can store variables in the contexts for use in sub-parameter handlers:

This is how we implemented Join with Parameter and URLAction.