Skeleton is broken: no way to tell what a class inherits from its parent
We currently can't tell whether a field or method defined in a superclass and being accessed from a subclass method is actually inherited.
This is relevant for some metrics, eg. TCC. On the topic of Inheritance and Cohesion, the TCC metric says:
A subclass inherits methods and instance variables from its superclass(es). We have several options for evaluating cohesion of a subclass. We can (1) include all inherited components in the subclass in our evaluation, (2) include only methods and instance variables defined in the subclass, or (3) include inherited instance variables but not inherited methods. The class cohesion measures that we develop can be applied using any one of these options.
@yegor256/z please, pay attention to this issue
@llorllale you are saying that we need some markers for attributes and methods, that will tell us which of them are inherited from a super class. Correct?
@yegor256 I think we can have either, a) xsd:attribute on class indicating its superclass, or b) xsd:boolean on attributes+methods indicating if they're inherited
Any of those would work I guess.
@llorllale I think we need four things
-
class/parent -
class/interfaces/interface -
class/methods/method/@inherited -
class/attributes/attribute/@inherited
Agree?
@yegor256 for the purposes I stated in the description, I would just need method/@inherited and attribute/@inherited (assuming they're xsd:boolean).
But if you are planning on adding all those, my question is: how would I know from what I inherited the method or attribute from? The parent or one of the interfaces?
@llorllale we don't need to know that, right? Just boolean attributes will be enough?
@yegor256 correct. For now, just boolean attributes on <method> and <attribute> will be enough
Job #187 is now in scope, role is DEV
The job #187 assigned to @mesut/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job
@mesut/z this job was assigned to you 5days ago. It will be taken away from you soon, unless you close it, see §8. Read this and this, please.
@0crat wait