my dog learned polymorphism
The moose likes JSF and the fly likes Generate or override getter method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Generate or override getter method" Watch "Generate or override getter method" New topic
Author

Generate or override getter method

tehackio teha
Greenhorn

Joined: Dec 08, 2011
Posts: 3
I have many java classes for querying database. These classes are injected by CDI Weld on managed bean.
Is there any way(cdi, cglib, javassist...) which do not need write this method "get?AsMyObject" all time?
All classes looks like this below:



My web application uses: jboss7, seam 3.1;
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17148
    
  27

Welcome to the JavaRanch, Tehackio!

I have not studied Weld in detail, but in JSF, you normally would not be coding a lot of "get" method calls to set variables, because JSF is based on Inversion of Control and so JSF itself sets the variables (properties) by invoking the backing bean's "set" methods.


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generate or override getter method
 
It's not a secret anymore!