⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cli.java

📁 有限状态机程序自动生成器可以自动生成C、C++和Java程序。自动生成的程序很容易与程序员自己开发的程序结合。
💻 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 + -