Meaningless Drivel is fun!
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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Generate or override getter method" Watch "Generate or override getter method" New topic

Generate or override getter method

tehackio teha

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: 16895

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Generate or override getter method
It's not a secret anymore!