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

External Configuration #1

Closed
johncarl81 opened this issue Jul 16, 2013 · 1 comment
Closed

External Configuration #1

johncarl81 opened this issue Jul 16, 2013 · 1 comment

Comments

@johncarl81
Copy link
Owner

Beans to be enhanced by the annotation processor may not exist in the current compile pass (ie: in an external library or from code generation). Therefore, we need a way to configure Parceler to find these classes.

The idea is to add an annotation that Parceler will recognize:

@ParcelClass(Example.class)

Since this annotation doesn't rely on the class that it annotates, this configuration can appear anywhere. Perhaps on the Application class or some other convenient configuration point:

@ParcelClass(Example.class)
public class SomeApplication extends Application{
//...
}
@johncarl81
Copy link
Owner Author

Ended up with the following api:

@ParcelClasses{
    @ParcelClass(Example.class),
    @ParcelClass(value = Example2.class), converter=Example2Converter.class
}
public class SomeApplication extends Application{
//...
}

Which allows for multiple Parcels to be defined along with the associated optional manual converter.

johncarl81 pushed a commit that referenced this issue May 25, 2017
Merging from origin repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant