use of com.microsoft.azure.toolkit.lib.legacy.function.bindings.Binding in project azure-tools-for-java by Microsoft.
the class FunctionUtils method parseAnnotations.
private static List<Binding> parseAnnotations(final Project project, JvmAnnotation[] annotations) throws AzureExecutionException {
final List<Binding> bindings = new ArrayList<>();
for (final JvmAnnotation annotation : annotations) {
final Binding binding = getBinding(project, annotation);
if (binding != null) {
Log.debug("Adding binding: " + binding.toString());
bindings.add(binding);
}
}
return bindings;
}
use of com.microsoft.azure.toolkit.lib.legacy.function.bindings.Binding in project azure-tools-for-java by Microsoft.
the class FunctionUtils method createBinding.
private static Binding createBinding(final Project project, BindingEnum bindingEnum, PsiAnnotation annotation) throws AzureExecutionException {
final Binding binding = new Binding(bindingEnum);
AnnotationHelper.evaluateAnnotationProperties(project, annotation, REQUIRED_ATTRIBUTE_MAP.get(bindingEnum)).forEach((name, value) -> {
binding.setAttribute(name, value);
});
return binding;
}
Aggregations