denniskaselow / dartemis

A Dart port of the Artemis Entity System Framework
BSD 2-Clause "Simplified" License
49 stars 6 forks source link

protected methods in Java version of Artemis #11

Closed denniskaselow closed 1 week ago

denniskaselow commented 12 years ago

In Dart they can either be private (only usable within the library) or public (everyone can call them). But they exist only to be overridden in subclasses.

This needs to be done different using other dart-features.

denniskaselow commented 12 years ago

After reading this: https://groups.google.com/a/dartlang.org/forum/?fromgroups#!topic/misc/b9cgFMEZk00

I have decided to simply make the protected methods public. It's only the process()-method that is supposed to be called, so I've added this bit to the documentation. Using delegation like in commit d1141db adds too much overhead for little benefit. I'll just wait for this to be fixed and than I can make the methods protected https://code.google.com/p/dart/issues/detail?id=3193

denniskaselow commented 12 years ago

Another issue concerning this http://code.google.com/p/dart/issues/detail?id=6119

denniskaselow commented 4 years ago

An annotation does exist now, but it's not inherited (yet?) and its behavior otherwise is as I would expect it (can call protected methods from within the same library), while the documentation says access to protected methods is only intended from within the class. There are several issues concerning various things, so more waiting.