in src/main/java/com/microsoft/azure/functions/worker/broker/CoreTypeResolver.java [47:86]
public static String getAnnotationName(Parameter parameter) {
Annotation[] annotations = parameter.getAnnotations();
String annotationName = null;
for (Annotation annotation : annotations) {
//Checking if it's warmup function, warmup function has its own HttpTrigger class defined in the function jar file.
//If it's not warmup function will bypass this check and fail back to normal logics.
if (annotation.annotationType().getName().equals("com.microsoft.azure.functions.warmup.java.HttpTrigger")){
annotationName = getBindingNameFromAnnotation(annotation);
return annotationName;
}
if (annotation.toString().contains("com.microsoft.azure.functions.annotation")) {
annotationName = getBindingNameFromAnnotation(annotation);
}
if (annotationName == null) {
Annotation customBindingAnnotation = null;
for (Annotation item : annotation.annotationType().getAnnotations()){
if (item.annotationType().getName().equals("com.microsoft.azure.functions.annotation.CustomBinding")) {
customBindingAnnotation = item;
break;
}
}
if (customBindingAnnotation != null) {
annotationName = getBindingNameFromAnnotation(annotation);
if (annotationName == null) {
try {
Method name = customBindingAnnotation.annotationType().getMethod("name");
annotationName = getBindingNameFromCustomBindingAnnotation(customBindingAnnotation, name);
} catch (NoSuchMethodException ex) {
// Ignore
}
}
}
}
}
return annotationName;
}