[forge-dev] How to get value as class from annotation?

Doychin Bondzhev doychin at dsoft-bg.com
Sat Aug 8 12:23:24 EDT 2015


We are part of the group that is trying to develop spring boot forge 
addon. We try to cover the case when we have entity with IdClass 
annotation and we have problem to get IdClass value parameter as some 
object that can give use more inform about that class.

This is the code we are using :

JavaClassSource entityClass = ((JavaResource) repositoryEntity

		if (entityClass.hasAnnotation(IdClass.class)) {
			AnnotationSource<JavaClassSource> idClassAnotation = entityClass
			String valueClassName = idClassAnotation.getLiteralValue();

We get as result in valueClassName the name of the class 
("ClassName.class") but we need some sort of object that can provide us 
with some additional information like qualified class name and simple 
class name.

This class can be part of the project or can be imported from another 
project/jar archive.

Any idea how to achieve this?

Doychin Bondzhev
dSoft-Bulgaria Ltd.
PowerPro - billing & provisioning solution for Service providers
PowerStor - Warehouse & POS
Mobile: +359888243116
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doychin.vcf
Type: text/x-vcard
Size: 268 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/forge-dev/attachments/20150808/cfb6b6b4/attachment.vcf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5944 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.jboss.org/pipermail/forge-dev/attachments/20150808/cfb6b6b4/attachment.bin 

More information about the forge-dev mailing list