Package com.ericlam.mc.groovier
Interface ArgumentParser
public interface ArgumentParser
mainly use for command argument
-
Method Summary
-
Method Details
-
parse
- Type Parameters:
T
- argument type- Parameters:
type
- argument typearg
- 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 typearg
- argument string- Returns:
- argument value
- Throws:
com.ericlam.mc.groovier.ArgumentParseException
- if argument parse failed
-