Skip to content

Instantly share code, notes, and snippets.

@johnament
Created February 1, 2013 15:19
Show Gist options
  • Select an option

  • Save johnament/4691917 to your computer and use it in GitHub Desktop.

Select an option

Save johnament/4691917 to your computer and use it in GitHub Desktop.
@Produces
@TWSClientOptions
public TWSClientConfiguration findAppropriate(final InjectionPoint ip) {
final Set<Annotation> qualifiers = ip.getQualifiers();
TWSClientOptions tco = null;
for (final Annotation a : qualifiers) {
if (a.annotationType() == TWSClientOptions.class) {
tco = (TWSClientOptions) a;
break;
}
}
if (tco != null) {
final Bob b = this.bobDAO.find(tco.bobId());
final Sam s = this.samDAO.find(tco.samId());
return this.findAppropriate(c, s);
}
else {
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment