Hi,
I try to create class processr similar to the controller addon one. I've created RooMyNew annotation and all necessary metadata classes and when annotating types with my annotation everything works fine - aj are getting created and filled with all i put.
However i have problems with scanning annotated classes when executing command. Condition:
returns falseCode:if (item instanceof MyNewMetadata)
and messages are following:Code:Set<ClassOrInterfaceTypeDetails> cids = typeLocationService.findClassesOrInterfaceDetailsWithAnnotation(new JavaType(RooMyNew.class.getName())); each_file: for (ClassOrInterfaceTypeDetails cid : cids) { if (Modifier.isAbstract(cid.getModifier())) { continue; } logger.warning(cid.getName().getFullyQualifiedTypeName()); Set<MetadataItem> metadata = itdMetadataScanner.getMetadata(cid.getDeclaredByMetadataId()); for (MetadataItem item : metadata) { logger.warning(item.getId()); if (item instanceof MyNewMetadata) { //NOT COMING HERE... } else { logger.warning("Is NOT MyNewMetadata instance"); } }
MID:xxxx.yyyy.roo.addon.test.MyNewMetadata#SRC_MAI N_JAVA?edu.form.domain.TestEntity
Is NOT MyNewMetadata instance
What do i miss?


Reply With Quote
