use of org.eclipse.smarthome.automation.annotation.ActionOutput in project smarthome by eclipse.
the class AnnotationActionModuleTypeHelper method getOutputsFromMethod.
private List<Output> getOutputsFromMethod(Method method) {
List<Output> outputs = new ArrayList<>();
if (method.isAnnotationPresent(ActionOutputs.class)) {
for (ActionOutput ruleActionOutput : method.getAnnotationsByType(ActionOutput.class)) {
Output output = new Output(ruleActionOutput.name(), ruleActionOutput.type(), ruleActionOutput.label(), ruleActionOutput.description(), Arrays.stream(ruleActionOutput.tags()).collect(Collectors.toSet()), ruleActionOutput.reference(), ruleActionOutput.defaultValue());
outputs.add(output);
}
}
return outputs;
}
Aggregations