Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modularizing annotation processing #156

Closed
allenxwang opened this issue Aug 21, 2014 · 1 comment
Closed

Modularizing annotation processing #156

allenxwang opened this issue Aug 21, 2014 · 1 comment

Comments

@allenxwang
Copy link

Currently annotation processing is tightly coupled in a few classes. This will cause maintenance problem down the road and makes it impossible to plug-in a third party annotation processor.

The proposal is to modularize annotation processing and have a unified interface for annotation processor:

public interface AnnotationProcessor {
    void process(HttpRequestTemplate.Builder templateBuilder, Method method);

    void process(HttpResourceGroup.Builder groupBuilder, Class interfaceClass);
}

Built-in annotation processors will automatically register with Ribbon. For third party annotation processors, we use the JDK ServiceLoader to find the implementations of this interface on current thread's context class loader.

allenxwang pushed a commit to allenxwang/ribbon that referenced this issue Aug 21, 2014
allenxwang pushed a commit that referenced this issue Aug 25, 2014
@allenxwang
Copy link
Author

Fixed in 2.0-RC6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant