katatunix / artemis-framework

Automatically exported from code.google.com/p/artemis-framework
0 stars 0 forks source link

Naming conventions for Aspects #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using static methods is very convenient but the current naming convention could 
be simplified. I suggest following the Guava naming convention. For example

Aspect.getAspectForAll(Position.class)

would be no less clear than:

Aspects.all(Position.class)

Moving these static constructor methods to a separate file (Aspects.java) would 
remove some clutter from Aspect.java. This would also let us add some extra 
methods with varying numbers of component types to prevent the need for 
@SuppressWarnings("unchecked") annotation throughout the users code (again 
similar to Guava).

For reference, I've included the Aspects class I'm currently using.

Original issue reported on code.google.com by seraphim...@gmail.com on 14 Oct 2012 at 3:28

Attachments: