Re: [patch] FieldOrMethod.java, added two convenience methods

Enver Haase <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <Pine.GSO.4.50.0212031348220.22766-100000@troll>
> I added two convenience methods to FieldOrMethod class:
> * Type getReturnType()
> * Type[] getArgumentTypes()

I don't like them.

I can't see either argument types of a field,
nor a return type. I'd say these convenience
methods belong in the Method class; and the
Field class should have a "Type getType()"
method.

Look at the "FieldOrMethod" in the "generic" package;
there's all of the above, done in the way I'd suppose.

As for the dependency "Type" indroduces--- that's
not really a problem, I believe.
On the other hand, if you need elements of the "generic"
package, why don't you simply convert a "classfile" Method or
Field to its "generic" counterpart and use all of the
already-implemented features instead of re-implementing
them all in the "classfile" package?

Greetings,
Enver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.