[forge-dev] I need to get @IdClass value as Class instance
doychin at gmail.com
Tue Aug 18 16:48:22 EDT 2015
Every method except getLiteralValue() returns null.
I'm not sure imports can help. If import is on package level there is no
way to find which package is the right one.
On Tue, Aug 18, 2015 at 10:53 PM, George Gastaldi <ggastald at redhat.com>
> Hi Doychin,
> What happens if you call idClassAnotation.getClassValue() ? Maybe you can
> iterate through the imports to find out the class name and load it using
> the ClassLoaderFacet ?
> Best Regards,
> George Gastaldi
> On Tue, Aug 18, 2015 at 3:45 PM, Doychin Bondzhev <doychin at gmail.com>
>> I'm continuing to try to solve the problem with IdClass annotation.
>> The problem is that when I get value of annotation with this code:
>> AnnotationSource<JavaClassSource> idClassAnotation = entityClass
>> String valueClassName = idClassAnotation.getLiteralValue();
>> I get "className.class". There is no info about package.
>> Also Class Loader facet has no access to classes defined in the project.
>> Only to external classes. At least I was not able to load for example
>> Entity class.
>> If I had access to entity class from class loader I can get annotation
>> from class definition and get it's value.
>> Also I need to test primary key class that it implements
>> Any suggestion where to look for sample how to solve all the problems
>> mentioned above?
>> thanks in advance.
>> Doychin Bondzhev
>> dSoft-Bulgaria Ltd.
>> PowerPro - billing & provisioning solution for Service providers
>> PowerStor - Warehouse & POS
>> Mobile: +359888243116
>> forge-dev mailing list
>> forge-dev at lists.jboss.org
> *George Gastaldi | Senior Software Engineer*
> JBoss Forge Team
> T: +55 11 3524-6169
> M: +55 47 9711-1000
> forge-dev mailing list
> forge-dev at lists.jboss.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the forge-dev