Makes a copy of this constructor and converts it into a method. The signature of the mehtod is the same as the that of this constructor. The return type is
void
. The resulting method must be appended to the class specified by
declaring
. If this constructor is a static initializer, the resulting method takes no parameter.
An occurrence of another constructor call this()
or a super constructor call super()
is eliminated from the resulting method.
The immediate super class of the class declaring this constructor must be also a super class of the class declaring the resulting method. If the constructor accesses a field, the class declaring the resulting method must also declare a field with the same name and type.
@param name the name of the resulting method.
@param declaring the class declaring the resulting method.