public Object convert()

in components-starter/camel-azure-cosmosdb-starter/src/main/java/org/apache/camel/component/azure/cosmosdb/springboot/CosmosDbComponentConverter.java [50:70]


    public Object convert(
            Object source,
            TypeDescriptor sourceType,
            TypeDescriptor targetType) {
        if (source == null) {
            return null;
        }
        String ref = source.toString();
        if (!ref.startsWith("#")) {
            return null;
        }
        ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
        switch (targetType.getName()) {
            case "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration.class);
            case "com.azure.cosmos.CosmosAsyncClient": return applicationContext.getBean(ref, com.azure.cosmos.CosmosAsyncClient.class);
            case "com.azure.cosmos.models.ThroughputProperties": return applicationContext.getBean(ref, com.azure.cosmos.models.ThroughputProperties.class);
            case "com.azure.cosmos.models.ChangeFeedProcessorOptions": return applicationContext.getBean(ref, com.azure.cosmos.models.ChangeFeedProcessorOptions.class);
            case "com.azure.cosmos.models.CosmosQueryRequestOptions": return applicationContext.getBean(ref, com.azure.cosmos.models.CosmosQueryRequestOptions.class);
        }
        return null;
    }