org.bushe.swing.event.annotation
Class UseTheClassOfTheAnnotatedMethodsParameter
java.lang.Object
org.bushe.swing.event.annotation.UseTheClassOfTheAnnotatedMethodsParameter
public final class UseTheClassOfTheAnnotatedMethodsParameter
- extends Object
This is a dummy class to get around a limitation with annotations.
It's nice to use an @EventSubscriber annotation without any parameters. For example:
@EventSubscriber public void onEvent(FooEvent event) { //do something }
In this case, the method should
obviously be subscribed to the FooEvent class. Since the eventClass is not required, annotations require a default to
be supplied. A default of null is not allowed by the compiler since it is not a class literal. A default of
Object.class cannot be used, since it is legal to subscribe to Object. hence, this class was created which documents
the issue and provides decent feedback when using an IDE's parameter insight.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UseTheClassOfTheAnnotatedMethodsParameter
public UseTheClassOfTheAnnotatedMethodsParameter()
Copyright © 2011 Bushe Enterprises, Inc.. All Rights Reserved.