Interface ArgumentParser


public interface ArgumentParser
mainly use for command argument
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    parse(TypeLiteral<T> typeLiteral, String arg)
     
    <T> T
    parse(Type type, String arg)
     
  • Method Details

    • parse

      <T> T parse(Type type, String arg) throws com.ericlam.mc.groovier.ArgumentParseException
      Type Parameters:
      T - argument type
      Parameters:
      type - argument type
      arg - argument string
      Returns:
      argument value
      Throws:
      com.ericlam.mc.groovier.ArgumentParseException - if argument parse failed
    • parse

      <T> T parse(TypeLiteral<T> typeLiteral, String arg) throws com.ericlam.mc.groovier.ArgumentParseException
      Type Parameters:
      T - argument type
      Parameters:
      typeLiteral - argument type
      arg - argument string
      Returns:
      argument value
      Throws:
      com.ericlam.mc.groovier.ArgumentParseException - if argument parse failed