use of org.apache.camel.component.servicenow.annotations.ServiceNowSysParm in project camel-quarkus by apache.
the class ServicenowProcessor method registerForReflection.
@BuildStep
void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass, CombinedIndexBuildItem combinedIndex) {
IndexView index = combinedIndex.getIndex();
// Get candidate DTOs annotated with ServiceNowSysParm
String[] serviceNowDtos = index.getAnnotations(DotName.createSimple(ServiceNowSysParm.class.getName())).stream().map(AnnotationInstance::target).filter(annotationTarget -> annotationTarget.kind().equals(AnnotationTarget.Kind.CLASS)).map(AnnotationTarget::asClass).filter(CamelSupport::isConcrete).filter(CamelSupport::isPublic).map(classInfo -> classInfo.name().toString()).filter(className -> !className.startsWith("org.apache.camel.component.servicenow.model")).toArray(String[]::new);
reflectiveClass.produce(new ReflectiveClassBuildItem(false, true, serviceNowDtos));
reflectiveClass.produce(new ReflectiveClassBuildItem(false, true, HTTPTransportFactory.class, ServiceNowExceptionModel.class));
}
Aggregations