We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently when resolving components, Cormo matches qualifiers using only their types. According to CDI spec however, attribute properties can be used to further discriminate a qualifier, which helps reducing the number of qualifiers needed. Ref: http://docs.jboss.org/weld/reference/latest/en-US/html/injection.html#_qualifiers_with_members
E.g.
public class PayByAttribute: QualifierAttribute { public PaymentType PaymentType {get; set;} }
Then we select one of the possible property values when applying the qualifier:
[Inject, PayBy(PaymentType.Check)] PaymentProcessor _checkPayment;
We can force the container to ignore a member of a qualifier type by annotating the property with [Nonbinding] attribute.
public class PayByAttribute: QualifierAttribute { public PaymentType PaymentType {get; set;} [NonBinding] string Comment {get; set;} }
The same should also be applied on interceptor bindings and mixin-bindings. https://docs.jboss.org/weld/reference/1.0.0/en-US/html/interceptors.html#d0e3527
[Transactional(RequiresNew=false)] public class RequiresNewTransactionInterceptor: IAroundInvokeInterceptor { }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently when resolving components, Cormo matches qualifiers using only their types.
According to CDI spec however, attribute properties can be used to further discriminate a qualifier, which helps reducing the number of qualifiers needed. Ref: http://docs.jboss.org/weld/reference/latest/en-US/html/injection.html#_qualifiers_with_members
E.g.
Then we select one of the possible property values when applying the qualifier:
We can force the container to ignore a member of a qualifier type by annotating the property with [Nonbinding] attribute.
The same should also be applied on interceptor bindings and mixin-bindings.
https://docs.jboss.org/weld/reference/1.0.0/en-US/html/interceptors.html#d0e3527
E.g.
The text was updated successfully, but these errors were encountered: