Using "protected" instead "private" - Action Script 3

138 views Asked by At

I'm using ASDocs to make something like a "help" for my code and the problem is PRIVATE methods are omitted on ASDocs.

The thing is, on my project, I don't see any problems in change what is PRIVATE to PROTECTED. If I do that, the docummentation will be generated with everything I need.

So, the big question is: There's a problem have a project using only PROTECTED and PUBLIC methods and properties?

1

There are 1 answers

1
Crabar On

The problem that ASDoc omit private members makes sense. ASDoc used primarily to create documentation for API. Private members are not accessible from outside the class and cannot be inherited. So question are you really need ASDoc for private members?

And answer for your question about using only protected members: it breaks encapsulation, so it will be not good decision.