Java annotations as GitHub names

Twitter, Facebook and GitHub have the name reference functionality in common. To mention another user, person and/or organization in your post, tweet, timeline and/or commit just type @ and add the corresponding name. Escpecially, GitHub and Java have an interesting relationship because whenever a comment or commit containing a Java annotation is published an equally-named GitHub user is notified. In this post I exploit this by registering FunctionalInterface and RestController as GitHub users and by providing a little script to check for available Java-GitHub-Names.


The first name I registered was FunctionalInterface which was introduced with Java 8 and marks an interface to have a single abstract method. In this way it may be used by the compiler for type inference for lambda expressions. Next, I registered RestController which is defined by the Spring MVC framework indicating classes as Front Controllers for RESTful services. Some Java annotations were already registered as GitHub users. To check available names I created a little Python script.

Each line in the annotations file is considered to be a user name. The list contains all annotations in Java SE 8 and some Spring annotations. Following 27 names were taken: After, Around, Aspect, Autowired, Before, Component, Order, Pointcut, Qualifier, Repeat, Repository, Required, Resource, Rollback, Scope, Service, Timed, Transactional, Deprecated, Documented, FunctionalInterface, Inherited, Override, Retention, SuppressWarnings, Target and RestController.


Annotation Project User # mentions Example link
FunctionalInterface Eclipse JDT core asbharadwaj 1 commit
FunctionalInterface sai jmorwick 6 commit
FunctionalInterface ironrhino zhouyanming 1 commit
FunctionalInterface spark bentolor 5 commit
FunctionalInterface OTBProject NthPortal 2 commit
FunctionalInterface SpongeAPI gabizo 1 comment
FunctionalInterface Eclipse Platform ui vogella 1 commit
RestController Kuitos 1 issue
RestController firstRest prochiy - -
RestController Spring UnAmi - -
RestController springfox rcruzper 1 issue
RestController spring-integration-kafka ashishsoni 1 issue
RestController exercise-spring-boot-integration-tests ebragaparah 1 commit
RestController find matthew-gordon-h 1 commit
RestController swagger4spring-web-jdk6 wkennedy 2 commit
RestController spring-security-oauth berrytchaks 1 issue
RestController springside shurun19851206 2 commit

I would have assumed to get more notifactions from annotation FunctionalInterface. One reason for this limited recall might be that an user is only notified when the mention is in a comment or commit message. Looking at the projects themselves there is eclipse as the biggest one and sai as the smallest one. Also the commit sizes differ: SpongeAPI has rather large commits while OTBProject has smaller ones. Different to FunctionalInterface RestController is referenced by a lot more toy projects (for example Spring and firstRest) which yields more notifications. Personally, I perceived the notfications as pleasent because I get informed about new code related to topics I am interested in. I would not mind, if GitHub would add a topic based subscription feature.

comments powered by Disqus