use of org.mule.metadata.api.annotation.TypeAnnotation 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