use of org.mule.runtime.module.extension.internal.loader.annotations.CustomDefinedStaticTypeAnnotation in project mule by mulesoft.
the class CustomStaticTypeDeclarationEnricher method declareCustomType.
private <T extends BaseDeclaration & TypedDeclaration> void declareCustomType(T declaration, MetadataType target) {
MetadataType type = declaration.getType();
Class<?> clazz = getType(type).orElseThrow(() -> new IllegalStateException("Could not find class in type [" + type + "]"));
Set<TypeAnnotation> a = new HashSet<>(asList(new ClassInformationAnnotation(clazz), new CustomDefinedStaticTypeAnnotation()));
declaration.setType(enricher.enrich(target, a), false);
}
Aggregations