[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inherited Methods



Leon Krupkin wrote:
Is there any way to determine if a method is an inherited one? For
example, if class A implements method m, and class B extends A and
overrides m, is there a way to determine that m was originally declared
in A?

Check if there is class in the the class hierarchy branch of B beyond A that declares m. If none exists then A injected m into the class hierarchy. If such a class exists, then A inherited m.


I am sure there are plenty of implementations outside of Soot that answer this question and I always wonder why are helper methods that answer such questions not provided in Soot.

That's my 2 cents,

--

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad