[jboss-user] [Javassist] - Re: Grabbing an existing class's constructors?

Robby Cornelissen do-not-reply at jboss.com
Tue May 21 06:46:46 EDT 2013

Robby Cornelissen [https://community.jboss.org/people/robby.cornelissen] created the discussion

"Re: Grabbing an existing class's constructors?"

To view the discussion, visit: https://community.jboss.org/message/818605#818605

I think you're mixing two concepts:
* Class initializers, AKA static constructor, AKA static initialization block, AKA static { // ... }. This can be obtained by calling getClassInitializer() on a CtClass object, which will return you a corresponding CtConstructor object (if a static initializer was declared in the class).
* Constructors, which can be obtained by calling getConstructors() on a CtClass object, which will return you an array of CtConstructor objects.
As you are undoubtedly aware, the former is used for class initialization, the latter for object initialization.

Reply to this message by going to Community

Start a new discussion in Javassist at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130521/cd91aa85/attachment.html 

More information about the jboss-user mailing list