Added support of command class registration

with bonus javadoc deliciousness.

signed-off-by: Snaipe franklinmathieu@gmail.com