INRIA / spoon

Spoon is a metaprogramming library to analyze and transform Java source code. :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.
http://spoon.gforge.inria.fr/
Other
1.74k stars 347 forks source link

Deprecate CtInvocation/CtConstructorCall/CtNewClass.get/set/addActualTypeArgs #714

Closed leventov closed 8 years ago

leventov commented 8 years ago

Because they now delegate to executable.get/set/addActualTypeArgs, i. e. left for compatibility, but for unambiguity and least astonishment, the new code should use ctInvocation.getExecutable.xxxActualTypeArgs.

Also I think it's a good practice for all such situations, when setters/getters/adders are left for compatibility but doesn't change/access own node's fields (but rather fields of the fields or syntetic), to mark such compatibility proxy methods as deprecated.

monperrus commented 8 years ago

I'm not in favor of deprecating them because they can be useful, but more for documenting the delegation in the interface CtActualTypeContainer. what do you think?