Search in sources :

Example 1 with FunctionName

use of com.microsoft.azure.serverless.functions.annotation.FunctionName in project azure-gradle-plugins by lenala.

the class AnnotationHandlerImpl method generateConfigurations.

@Override
public Map<String, FunctionConfiguration> generateConfigurations(final Set<Method> methods) throws Exception {
    final Map<String, FunctionConfiguration> configMap = new HashMap<>();
    for (final Method method : methods) {
        final FunctionName functionAnnotation = method.getAnnotation(FunctionName.class);
        final String functionName = functionAnnotation.value();
        validateFunctionName(configMap.keySet(), functionName);
        logger.quiet("Starting processing function : " + functionName);
        configMap.put(functionName, generateConfiguration(method));
    }
    return configMap;
}
Also used : FunctionName(com.microsoft.azure.serverless.functions.annotation.FunctionName) HashMap(java.util.HashMap) FunctionConfiguration(com.microsoft.azure.gradle.functions.configuration.FunctionConfiguration) Method(java.lang.reflect.Method)

Aggregations

FunctionConfiguration (com.microsoft.azure.gradle.functions.configuration.FunctionConfiguration)1 FunctionName (com.microsoft.azure.serverless.functions.annotation.FunctionName)1 Method (java.lang.reflect.Method)1 HashMap (java.util.HashMap)1