public interface KeywordExecutable
ServiceLoader to auto-discover classes executable with a convenient keyword on the command-line.
All implementing classes who have an entry in META-INF/services/KeywordExecutable on the classpath will be constructed
by the ServiceLoader, so they should be lightweight and quickly constructible with a mandatory no-argument constructor. Because of this, implementing
classes could simply be factories which execute a different class, if that class is expensive to construct or cannot have a no-argument constructor.
One way to easily create META-INF/services files is to use the AutoService annotation.
If the implementing class also wishes to have a redundant main method, it may be useful to simply implement main as:
new MyImplementingClass().execute(args);
String keyword()
Copyright © 2015 Apache Accumulo Project. All rights reserved.