소스 검색

implementing all JMP mnemonics with variable page

Wilfried Klaas 6 년 전
부모
커밋
fd93c2da84

+ 28 - 1
examples/Blink.tps

@@ -1,5 +1,32 @@
+LDA #6
+MOV C,A
+:loop
+NOP
+NOP
+NOP
+NOP
+NOP
 PORT #0x0F
 WAIT 200ms
 PORT #0x00
 WAIT 200ms
-RJMP 4
+NOP
+PAGE :?
+CALL :loop3
+NOP
+NOP
+NOP
+PAGE :?
+LOOPC :loop
+NOP
+NOP
+:loop2
+PORT #0x0F
+:loop3
+PORT #0x00
+NOP
+NOP
+NOP
+PAGE :?
+LOOPD :loop2
+NOP

+ 6 - 0
examples/Blink2.tps

@@ -0,0 +1,6 @@
+:loop
+PORT #0x0F
+WAIT 200ms
+PORT #0x00
+WAIT 200ms
+RJMP :loop

+ 20 - 0
examples/Blink_LOOP.tps

@@ -0,0 +1,20 @@
+PAGE :?
+JMP :loop2
+:loop
+NOP
+NOP
+NOP
+NOP
+NOP
+PORT #0x0F
+WAIT 200ms
+PORT #0x00
+WAIT 200ms
+NOP
+NOP
+NOP
+NOP
+:loop2
+RJMP :loop
+NOP
+NOP

+ 26 - 11
src/main/java/de/mcs/tools/sps/SPSAssembler.java

@@ -41,10 +41,14 @@ import org.apache.commons.lang3.StringUtils;
 
 import de.mcs.tools.IntelHex;
 import de.mcs.tools.sps.exceptions.SyntaxError;
+import de.mcs.tools.sps.mnemonic.CALL;
 import de.mcs.tools.sps.mnemonic.HARDWARE;
 import de.mcs.tools.sps.mnemonic.JMP;
+import de.mcs.tools.sps.mnemonic.LOOPC;
+import de.mcs.tools.sps.mnemonic.LOOPD;
 import de.mcs.tools.sps.mnemonic.Mnemonic;
 import de.mcs.tools.sps.mnemonic.MnemonicFactory;
+import de.mcs.tools.sps.mnemonic.PAGE;
 import de.mcs.tools.sps.mnemonic.RJMP;
 import de.mcs.utils.jsap.Command;
 import de.mcs.utils.jsap.CommandlineProcessor;
@@ -151,20 +155,21 @@ public class SPSAssembler {
       for (Iterator<Mnemonic> iterator = mnemonics.iterator(); iterator.hasNext();) {
         Mnemonic mnemonic = iterator.next();
         if (!mnemonic.allowedHardware().contains(destination)) {
-          throw new SyntaxError(mnemonic.getLineNumber(),
-              String.format(
-                  "the mnemonic \"%s\" with the argument \"%s\" is not availble on the choosen hardware \"%s\"",
-                  mnemonic.getName(), mnemonic.getArgument(), destination.name()));
+          throw new SyntaxError(mnemonic.getLineNumber(), String.format(
+              "the mnemonic \"%s\" with the argument \"%s\" is not availble on the choosen hardware \"%s\"",
+              mnemonic.getName(), mnemonic.getArgument() == null ? "" : mnemonic.getArgument(), destination.name()));
         }
       }
 
       System.out.println("parsing line numbers");
       int address = 0;
+      Mnemonic predecessor = null;
       for (Iterator<Mnemonic> iterator = mnemonics.iterator(); iterator.hasNext();) {
         Mnemonic mnemonic = iterator.next();
-        if (mnemonic instanceof JMP) {
+        if ((mnemonic instanceof JMP) || (mnemonic instanceof LOOPC) || (mnemonic instanceof LOOPD)
+            || (mnemonic instanceof CALL)) {
           if (mnemonic.isLabel()) {
-            processJMP(mnemonic);
+            processJMP(mnemonic, predecessor);
           }
         }
         if (mnemonic instanceof RJMP) {
@@ -173,6 +178,7 @@ public class SPSAssembler {
           }
         }
         address++;
+        predecessor = mnemonic;
       }
 
       System.out.println("Mnemonics");
@@ -183,10 +189,12 @@ public class SPSAssembler {
         pos++;
       }
 
-      System.out.println();
-      System.out.println("labels");
-      for (Entry<String, Integer> entry : labels.entrySet()) {
-        System.out.printf("%s: 0x%03x\r\n", entry.getKey(), entry.getValue());
+      if ((labels != null) && (labels.size() > 0)) {
+        System.out.println();
+        System.out.println("labels");
+        for (Entry<String, Integer> entry : labels.entrySet()) {
+          System.out.printf("%s: 0x%03x\r\n", entry.getKey(), entry.getValue());
+        }
       }
 
       if (outputFormat.equals(FORMAT.HEX)) {
@@ -241,7 +249,7 @@ public class SPSAssembler {
     output.close();
   }
 
-  private static void processJMP(Mnemonic mnemonic) throws SyntaxError {
+  private static void processJMP(Mnemonic mnemonic, Mnemonic predecessor) throws SyntaxError {
     String label = mnemonic.getArgument();
     if (!labels.containsKey(label)) {
       throw new SyntaxError(mnemonic.getLineNumber(),
@@ -252,6 +260,13 @@ public class SPSAssembler {
     lineNumber = lineNumber % 16;
     mnemonic.setArgument(Integer.toString(lineNumber));
     mnemonic.checkArgument();
+    if ((predecessor != null) && (predecessor instanceof PAGE)) {
+      PAGE pageMne = (PAGE) predecessor;
+      if (pageMne.isCalculate()) {
+        pageMne.setArgument(Integer.toString(page));
+        pageMne.checkArgument();
+      }
+    }
   }
 
   private static void processRJMP(int address, Mnemonic mnemonic) throws SyntaxError {

+ 10 - 0
src/main/java/de/mcs/tools/sps/mnemonic/PAGE.java

@@ -38,10 +38,12 @@ import de.mcs.tools.sps.exceptions.SyntaxError;
 public class PAGE extends AbstractMnemonic implements Mnemonic {
 
   byte value;
+  private boolean calculate;
 
   public PAGE(String line) throws SyntaxError {
     super(line);
     value = 0;
+    calculate = false;
   }
 
   @Override
@@ -50,6 +52,11 @@ public class PAGE extends AbstractMnemonic implements Mnemonic {
       throw new SyntaxError(getLineNumber(),
           String.format("missing argument for %s.", this.getClass().getSimpleName()));
     }
+    String argument = getArgument();
+    if (":?".equals(argument)) {
+      calculate = true;
+      return;
+    }
     int myValue = getArgumentAsNumber();
     if ((myValue < 0) || (myValue > 15)) {
       throw new IllegalArgument(getLineNumber(),
@@ -81,4 +88,7 @@ public class PAGE extends AbstractMnemonic implements Mnemonic {
     return super.allowedHardware();
   }
 
+  public boolean isCalculate() {
+    return calculate;
+  }
 }

+ 0 - 14
src/main/java/de/mcs/utils/jsap/Command.java

@@ -1,14 +0,0 @@
-package de.mcs.utils.jsap;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-@Retention(RUNTIME)
-@Target(ElementType.TYPE)
-public @interface Command {
-
-  String help();
-}

+ 0 - 72
src/main/java/de/mcs/utils/jsap/CommandKey.java

@@ -1,72 +0,0 @@
-/**
- * MCS Media Computer Software
- * Copyright 2009 by Wilfried Klaas
- * Project: MCSUtils
- * File: CommandKey.java
- * EMail: W.Klaas@gmx.de
- * Created: 20.11.2009 Willie
- */
-
-package de.mcs.utils.jsap;
-
-/**
- * @author Willie
- */
-public class CommandKey {
-  private Character shortKey;
-
-  private String longKey;
-
-  private String name;
-
-  private String help;
-
-  private String defaultValue;
-
-  private boolean required;
-
-  public CommandKey(char shortKey, String longKey, String name, String help, String defaultValue) {
-    this(shortKey, longKey, name, help);
-    this.defaultValue = defaultValue;
-  }
-
-  public CommandKey(char shortKey, String longKey, String name, String help, boolean required) {
-    this(shortKey, longKey, name, help);
-    this.required = required;
-  }
-
-  public CommandKey(char shortKey, String longKey, String name, String help) {
-    this.shortKey = shortKey;
-    this.longKey = longKey;
-    this.name = name;
-    this.help = help;
-    this.required = false;
-  }
-
-  public Character getShortKey() {
-    return shortKey;
-  }
-
-  public String getLongKey() {
-    return longKey;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public String getHelp() {
-    return help;
-  }
-
-  /**
-   * @return the defaultValue
-   */
-  public String getDefaultValue() {
-    return defaultValue;
-  }
-
-  public boolean isRequired() {
-    return required;
-  }
-}

+ 0 - 300
src/main/java/de/mcs/utils/jsap/CommandlineProcessor.java

@@ -1,300 +0,0 @@
-/**
- * MCS Media Computer Software
- * Copyright 2018 by Wilfried Klaas
- * Project: MCSUtils
- * File: ProcessCommandline.java
- * EMail: W.Klaas@gmx.de
- * Created: 29.11.2018 wklaa_000
- * 
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- */
-package de.mcs.utils.jsap;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.reflections.Reflections;
-import org.reflections.scanners.FieldAnnotationsScanner;
-import org.reflections.scanners.MethodAnnotationsScanner;
-import org.reflections.scanners.TypeAnnotationsScanner;
-import org.reflections.util.ClasspathHelper;
-import org.reflections.util.ConfigurationBuilder;
-
-import com.martiansoftware.jsap.FlaggedOption;
-import com.martiansoftware.jsap.JSAP;
-import com.martiansoftware.jsap.JSAPException;
-import com.martiansoftware.jsap.JSAPResult;
-import com.martiansoftware.jsap.UnflaggedOption;
-import com.martiansoftware.jsap.stringparsers.FileStringParser;
-import com.martiansoftware.jsap.stringparsers.StringStringParser;
-
-/**
- * @author wklaa_000
- *
- */
-public class CommandlineProcessor {
-
-  private static JSAP parser;
-  private static JSAPResult commandLineArgs;
-
-  private static Map<String, Method> parameterMethods;
-  private static Reflections reflections;
-  private static Command helpContext;
-
-  public static void processCommandline(Class class1, String[] args) {
-    parameterMethods = new HashMap<>();
-    parseParameters(class1, args);
-    checkParams();
-    processParameters();
-  };
-
-  private static void processParameters() {
-    parameterMethods.entrySet().forEach(e -> {
-      String name = e.getKey();
-      Method method = e.getValue();
-      processSwitchOption(name, method);
-      processStringOption(name, method);
-      processFileOption(name, method);
-
-    });
-  }
-
-  private static void processFileOption(String name, Method method) {
-    FileOption annotation = method.getAnnotation(FileOption.class);
-    if (annotation != null) {
-      try {
-        method.invoke(null, commandLineArgs.getFile(annotation.name()));
-      } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e1) {
-        e1.printStackTrace();
-      }
-    }
-  }
-
-  private static void processStringOption(String name, Method method) {
-    StringOption annotation = method.getAnnotation(StringOption.class);
-    if (annotation != null) {
-      try {
-        method.invoke(null, commandLineArgs.getString(annotation.name()));
-      } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e1) {
-        e1.printStackTrace();
-      }
-    }
-  }
-
-  private static void processSwitchOption(String name, Method method) {
-    SwitchOption annotation = method.getAnnotation(SwitchOption.class);
-    if (annotation != null) {
-      try {
-        method.invoke(null, commandLineArgs.getBoolean(name));
-      } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e1) {
-        e1.printStackTrace();
-      }
-    }
-  }
-
-  /**
-   * checking commandline parameters.
-   */
-  private static void checkParams() {
-    if (!commandLineArgs.success()) {
-
-      System.err.println();
-
-      // print out specific error messages describing the problems
-      // with the command line, THEN print usage, THEN print full
-      // help. This is called "beating the user with a clue stick."
-      for (@SuppressWarnings("rawtypes")
-      Iterator errs = commandLineArgs.getErrorMessageIterator(); errs.hasNext();) {
-        System.err.println("Error: " + errs.next());
-      }
-      showHelp("error");
-      System.exit(-1);
-    }
-
-  }
-
-  /**
-   * showing the actual help page in console.
-   */
-  public static void showHelp() {
-    showHelp(null);
-  }
-
-  /**
-   * showing the actual help page in console.
-   */
-  public static void showHelp(String message) {
-    if (helpContext != null) {
-      System.out.println(helpContext.help());
-    }
-    if (message != null) {
-      System.out.println(message);
-    }
-    System.out.println(parser.getHelp());
-  }
-
-  /**
-   * This function parses the commandline parameters. If the parameter -h or --help is avalible, generate a little help
-   * text.
-   * 
-   * @param class1
-   * 
-   * @param args
-   *          Commadline arguments
-   */
-  public static void parseParameters(Class class1, final String[] args) {
-    List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();
-    classLoadersList.add(ClasspathHelper.contextClassLoader());
-    classLoadersList.add(ClasspathHelper.staticClassLoader());
-
-    URL urlList = ClasspathHelper.forClass(Thread.class);
-    System.out.println(urlList.toString());
-
-    reflections = new Reflections(new ConfigurationBuilder().setUrls(urlList).setScanners(new TypeAnnotationsScanner(),
-        new FieldAnnotationsScanner(), new MethodAnnotationsScanner()));
-
-    // reflections = new Reflections("", new TypeAnnotationsScanner(), new MethodAnnotationsScanner(),
-    // new FieldAnnotationsScanner());
-
-    parser = new JSAP();
-    try {
-      registerHelpContext(class1);
-      // registering the parameters with default values
-      registerDefaultParameter();
-
-      // parsing the commadline
-      commandLineArgs = parser.parse(args);
-    } catch (JSAPException e) {
-      // Something goes wrong
-      System.out.println("Parsing exception:" + e.getMessage());
-      e.printStackTrace();
-      System.exit(1);
-    }
-  }
-
-  private static void registerHelpContext(Class class1) {
-    Command annotation = (Command) class1.getAnnotation(Command.class);
-    if (annotation != null) {
-      helpContext = annotation;
-    }
-  }
-
-  /**
-   * registering the parameters to the JSAP Parser.
-   * 
-   * @throws JSAPException
-   *           Something is going wrong
-   */
-  private static void registerDefaultParameter() throws JSAPException {
-    Map<Integer, UnflaggedOption> unflaggedOptions = new HashMap<>();
-
-    // MethodAnnotationsScanner
-    Set<Method> methodes = reflections.getMethodsAnnotatedWith(SwitchOption.class);
-    for (Method method : methodes) {
-      System.out.println("sw");
-      SwitchOption annotation = method.getAnnotation(SwitchOption.class);
-      // System.out.printf("short: %s, long: %s, name: %s, help: %s, def: %s,
-      // req: %s\r\n", annotation.shortKey(),
-      // annotation.longKey(), annotation.name(), annotation.help(),
-      // annotation.defaultValue(), annotation.required());
-
-      com.martiansoftware.jsap.Switch swtOption = new com.martiansoftware.jsap.Switch(annotation.name(),
-          annotation.shortKey(), annotation.longKey());
-      if (annotation.defaultValue()) {
-        swtOption.setDefault(Boolean.TRUE.toString());
-      }
-      swtOption.setHelp(annotation.help());
-      parser.registerParameter(swtOption);
-      parameterMethods.put(annotation.name(), method);
-    }
-
-    // // FieldAnnotationsScanner
-    // Set<Field> fields = reflections.getFieldsAnnotatedWith(Switch.class);
-    // for (Field field : fields) {
-    // System.out.println(field.getName());
-    // }
-
-    // MethodAnnotationsScanner
-    methodes = reflections.getMethodsAnnotatedWith(StringOption.class);
-    for (Method method : methodes) {
-      System.out.println("so");
-      StringOption annotation = method.getAnnotation(StringOption.class);
-      // System.out.printf("short: %s, long: %s, name: %s, help: %s, def: %s,
-      // req: %s\r\n", annotation.shortKey(),
-      // annotation.longKey(), annotation.name(), annotation.help(),
-      // annotation.defaultValue(), annotation.required());
-
-      StringStringParser stringParser = StringStringParser.getParser();
-      if (annotation.index() > 0) {
-        UnflaggedOption unflgopt = new UnflaggedOption(annotation.name(), stringParser, annotation.defaultValue(),
-            annotation.required(), false, annotation.help());
-        unflaggedOptions.put(annotation.index(), unflgopt);
-        parameterMethods.put(Integer.toString(annotation.index()), method);
-      } else {
-        FlaggedOption flgopt = new FlaggedOption(annotation.name(), stringParser, annotation.defaultValue(),
-            annotation.required(), annotation.shortKey(), annotation.longKey());
-        flgopt.setHelp(annotation.help());
-        parser.registerParameter(flgopt);
-        parameterMethods.put(annotation.name(), method);
-      }
-    }
-
-    // MethodAnnotationsScanner
-    methodes = reflections.getMethodsAnnotatedWith(FileOption.class);
-    for (Method method : methodes) {
-      System.out.println("fo");
-      FileOption annotation = method.getAnnotation(FileOption.class);
-      // System.out.printf("short: %s, long: %s, name: %s, help: %s, def: %s,
-      // req: %s\r\n", annotation.shortKey(),
-      // annotation.longKey(), annotation.name(), annotation.help(),
-      // annotation.defaultValue(), annotation.required());
-
-      FileStringParser fileStringParser = FileStringParser.getParser();
-      fileStringParser.setMustBeDirectory(annotation.mustBeDirectory());
-      fileStringParser.setMustExist(annotation.mustExists());
-
-      if (annotation.index() > 0) {
-        UnflaggedOption unflgopt = new UnflaggedOption(annotation.name(), fileStringParser, annotation.defaultValue(),
-            annotation.required(), false, annotation.help());
-        unflaggedOptions.put(annotation.index(), unflgopt);
-        parameterMethods.put(Integer.toString(annotation.index()), method);
-      } else {
-        FlaggedOption flgopt = new FlaggedOption(annotation.name(), fileStringParser, annotation.defaultValue(),
-            annotation.required(), annotation.shortKey(), annotation.longKey());
-        flgopt.setHelp(annotation.help());
-        parser.registerParameter(flgopt);
-        parameterMethods.put(annotation.name(), method);
-      }
-    }
-
-    List<Integer> indexes = new ArrayList<>();
-    unflaggedOptions.keySet().forEach(e -> indexes.add(e));
-    indexes.sort((x, y) -> {
-      int diff = x - y;
-      return (diff == 0) ? 1 : diff;
-    });
-
-    for (Integer e : indexes) {
-      parser.registerParameter(unflaggedOptions.get(e));
-    }
-  }
-}

+ 0 - 55
src/main/java/de/mcs/utils/jsap/FileOption.java

@@ -1,55 +0,0 @@
-/**
- * MCS Media Computer Software
- * Copyright 2018 by Wilfried Klaas
- * Project: MCSUtils
- * File: Option.java
- * EMail: W.Klaas@gmx.de
- * Created: 29.11.2018 wklaa_000
- * 
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- */
-package de.mcs.utils.jsap;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-@Retention(RUNTIME)
-@Target({ FIELD, METHOD })
-/**
- * @author wklaa_000
- *
- */
-public @interface FileOption {
-  char shortKey() default ' ';
-
-  String longKey() default "";
-
-  String name();
-
-  String help();
-
-  String defaultValue() default "";
-
-  boolean required() default false;
-
-  boolean mustBeDirectory() default false;
-
-  boolean mustExists() default false;
-
-  int index() default 0;
-}

+ 0 - 47
src/main/java/de/mcs/utils/jsap/JSAPHelper.java

@@ -1,47 +0,0 @@
-/**
- * MCS Media Computer Software
- * Copyright 2009 by Wilfried Klaas
- * Project: MCSUtils
- * File: JSAPHelper.java
- * EMail: W.Klaas@gmx.de
- * Created: 20.11.2009 Willie
- */
-
-package de.mcs.utils.jsap;
-
-import com.martiansoftware.jsap.FlaggedOption;
-import com.martiansoftware.jsap.JSAP;
-import com.martiansoftware.jsap.JSAPException;
-import com.martiansoftware.jsap.StringParser;
-import com.martiansoftware.jsap.Switch;
-
-/**
- * @author Willie
- */
-public class JSAPHelper {
-
-  public static void registerAsSwitch(JSAP parser, CommandKey command) throws JSAPException {
-    Switch swtOption = new Switch(command.getName(), command.getShortKey(), command.getLongKey());
-    if (command.getDefaultValue() != null) {
-      swtOption.setDefault(command.getDefaultValue());
-    }
-    swtOption.setHelp(command.getHelp());
-    parser.registerParameter(swtOption);
-  }
-
-  public static void registerAsOption(JSAP parser, CommandKey command, StringParser stringParser, String defaultValue,
-      boolean required) throws JSAPException {
-    FlaggedOption flgopt = new FlaggedOption(command.getName(), stringParser, defaultValue, required,
-        command.getShortKey(), command.getLongKey());
-    flgopt.setHelp(command.getHelp());
-    parser.registerParameter(flgopt);
-  }
-
-  public static void registerAsOption(JSAP parser, CommandKey command, StringParser stringParser, boolean required)
-      throws JSAPException {
-    FlaggedOption flgopt = new FlaggedOption(command.getName(), stringParser, command.getDefaultValue(), required,
-        command.getShortKey(), command.getLongKey());
-    flgopt.setHelp(command.getHelp());
-    parser.registerParameter(flgopt);
-  }
-}

+ 0 - 51
src/main/java/de/mcs/utils/jsap/StringOption.java

@@ -1,51 +0,0 @@
-/**
- * MCS Media Computer Software
- * Copyright 2018 by Wilfried Klaas
- * Project: MCSUtils
- * File: Option.java
- * EMail: W.Klaas@gmx.de
- * Created: 29.11.2018 wklaa_000
- * 
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- */
-package de.mcs.utils.jsap;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-@Retention(RUNTIME)
-@Target({ FIELD, METHOD })
-/**
- * @author wklaa_000
- *
- */
-public @interface StringOption {
-  char shortKey() default ' ';
-
-  String longKey() default "";
-
-  String name();
-
-  String help();
-
-  String defaultValue() default "";
-
-  boolean required() default false;
-
-  int index() default 0;
-}

+ 0 - 49
src/main/java/de/mcs/utils/jsap/SwitchOption.java

@@ -1,49 +0,0 @@
-/**
- * MCS Media Computer Software
- * Copyright 2018 by Wilfried Klaas
- * Project: MCSUtils
- * File: Switch.java
- * EMail: W.Klaas@gmx.de
- * Created: 29.11.2018 wklaa_000
- * 
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- */
-package de.mcs.utils.jsap;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-@Retention(RUNTIME)
-@Target({ FIELD, METHOD })
-/**
- * @author wklaa_000
- *
- */
-public @interface SwitchOption {
-  char shortKey();
-
-  String longKey();
-
-  String name();
-
-  String help();
-
-  boolean defaultValue();
-
-  boolean required();
-}

+ 0 - 8
src/main/java/de/mcs/utils/jsap/package-info.java

@@ -1,8 +0,0 @@
-/**
- * 
- */
-/**
- * @author w.klaas
- *
- */
-package de.mcs.utils.jsap;

+ 0 - 8
src/main/java/de/mcs/utils/package-info.java

@@ -1,8 +0,0 @@
-/**
- * 
- */
-/**
- * @author w.klaas
- *
- */
-package de.mcs.utils;