📄 cli.java
字号:
package org.abeesoft.fsmgenerator.cli;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import org.abeesoft.fsmgenerator.configuration.Configuration;
import org.abeesoft.fsmgenerator.exception.Exception;
public class CLI implements ICLI
{
protected String args[];
public CLI( String args[] )
{
super();
this.args = args;
}
public Configuration parse() throws Exception
{
Configuration configuration = null;
try
{
JAXBContext jc = JAXBContext.newInstance("org.abeesoft.fsmgenerator.configuration");
Unmarshaller u = jc.createUnmarshaller();
configuration = (Configuration)u.unmarshal(new FileInputStream(args[0]));
}
catch ( JAXBException e )
{
throw new Exception(e);
}
catch ( FileNotFoundException e )
{
throw new Exception(e);
}
return configuration;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -