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
[
https://community.jboss.org/message/818605#818605]
Start a new discussion in Javassist at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]