+
+ /**
+ * Return a new {@link BasicReader} ready for use.
+ *
+ * @return a {@link BasicReader}
+ */
+ public static BasicReader getReader() {
+ switch (defaultType) {
+ // case LOCAL:
+ // return new LocalReader().setType(ReaderType.LOCAL);
+ case CLI:
+ return new CliReader().setType(ReaderType.CLI);
+ }
+
+ return null;
+ }
+
+ /**
+ * The default {@link ReaderType} used when calling
+ * {@link BasicReader#getReader()}.
+ *
+ * @return the default type
+ */
+ public static ReaderType getDefaultReaderType() {
+ return defaultType;
+ }
+
+ /**
+ * The default {@link ReaderType} used when calling
+ * {@link BasicReader#getReader()}.
+ *
+ * @param defaultType
+ * the new default type
+ */
+ public static void setDefaultReaderType(ReaderType defaultType) {
+ BasicReader.defaultType = defaultType;
+ }