return p.getAnnotation(LinkELProvider.class);
return null;
}
private static ELProvider getELProvider(Method m){
LinkELProvider linkElProvider = findLinkELProvider(m);
if(linkElProvider == null)
return null;
Class<? extends ELProvider> elProviderClass = linkElProvider.value();
try{
return elProviderClass.newInstance();
}catch(Exception x){
logger.error("Could not instantiate ELProvider class "+elProviderClass.getName(), x);
throw new ServiceDiscoveryException(m, "Failed to instantiate ELProvider: "+elProviderClass.getName(), x);