private static List<OptionHolder> createDestinationOptionHolders(Annotation distributionAnnotation,
                                                                     StreamDefinition streamDefinition,
                                                                     Sink clientTransport,
                                                                     SiddhiAppContext siddhiAppContext) {
        io.siddhi.annotation.Extension sinkExt
                = clientTransport.getClass().getAnnotation(io.siddhi.annotation.Extension.class);

        List<OptionHolder> destinationOptHolders = new ArrayList<>();
        distributionAnnotation.getAnnotations().stream()
                .filter(annotation -> annotation.getName().equalsIgnoreCase(SiddhiConstants.ANNOTATION_DESTINATION))
                .forEach(destinationAnnotation -> destinationOptHolders.add(constructOptionHolder(streamDefinition,
                        updateAnnotationRef(destinationAnnotation, SiddhiConstants.ANNOTATION_DESTINATION,
                                siddhiAppContext), sinkExt, clientTransport.getSupportedDynamicOptions(),
                        true)));
        return destinationOptHolders;
    }
Utility class for queryParser to help with QueryRuntime
generation.
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/helper/DefinitionParserHelper.java