当前位置: 首页>>代码示例>>Java>>正文


Java ShellException类代码示例

本文整理汇总了Java中org.mybatis.generator.exception.ShellException的典型用法代码示例。如果您正苦于以下问题:Java ShellException类的具体用法?Java ShellException怎么用?Java ShellException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ShellException类属于org.mybatis.generator.exception包,在下文中一共展示了ShellException类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: write

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
/**
 * Write.
 *
 * @param node
 *            the node
 * @throws ShellException
 *             the shell exception
 */
protected void write(DocumentType node) throws ShellException {
    printWriter.print("<!DOCTYPE "); //$NON-NLS-1$
    printWriter.print(node.getName());
    String publicId = node.getPublicId();
    String systemId = node.getSystemId();
    if (publicId != null) {
        printWriter.print(" PUBLIC \""); //$NON-NLS-1$
        printWriter.print(publicId);
        printWriter.print("\" \""); //$NON-NLS-1$
        printWriter.print(systemId);
        printWriter.print('\"');
    } else if (systemId != null) {
        printWriter.print(" SYSTEM \""); //$NON-NLS-1$
        printWriter.print(systemId);
        printWriter.print('"');
    }

    String internalSubset = node.getInternalSubset();
    if (internalSubset != null) {
        printWriter.println(" ["); //$NON-NLS-1$
        printWriter.print(internalSubset);
        printWriter.print(']');
    }
    printWriter.println('>');
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:34,代码来源:DomWriter.java

示例2: write

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
protected void write(DocumentType node) throws ShellException {
    printWriter.print("<!DOCTYPE "); //$NON-NLS-1$
    printWriter.print(node.getName());
    String publicId = node.getPublicId();
    String systemId = node.getSystemId();
    if (publicId != null) {
        printWriter.print(" PUBLIC \""); //$NON-NLS-1$
        printWriter.print(publicId);
        printWriter.print("\" \""); //$NON-NLS-1$
        printWriter.print(systemId);
        printWriter.print('\"');
    } else if (systemId != null) {
        printWriter.print(" SYSTEM \""); //$NON-NLS-1$
        printWriter.print(systemId);
        printWriter.print('"');
    }

    String internalSubset = node.getInternalSubset();
    if (internalSubset != null) {
        printWriter.println(" ["); //$NON-NLS-1$
        printWriter.print(internalSubset);
        printWriter.print(']');
    }
    printWriter.println('>');
}
 
开发者ID:funny5258,项目名称:autocode,代码行数:26,代码来源:DomWriter.java

示例3: getDirectory

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
protected File getDirectory(String targetProject, String targetPackage) throws ShellException {
    File project = new File(targetProject);
    if (!project.isDirectory()) {
        project.mkdir();
    }
    StringBuilder sb = new StringBuilder();
    StringTokenizer st = new StringTokenizer(targetPackage, "."); //$NON-NLS-1$
    while (st.hasMoreTokens()) {
        sb.append(st.nextToken());
        sb.append(File.separatorChar);
    }

    File directory = new File(project, sb.toString());
    if (!directory.isDirectory()) {
        boolean rc = directory.mkdirs();
        if (!rc) {
            throw new ShellException("创建失败" + project);
        }
    }

    return directory;
}
 
开发者ID:funny5258,项目名称:autocode,代码行数:23,代码来源:CodeServiceImpl.java

示例4: write

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
protected void write(DocumentType node) throws ShellException {
	printWriter.print("<!DOCTYPE "); //$NON-NLS-1$
	printWriter.print(node.getName());
	String publicId = node.getPublicId();
	String systemId = node.getSystemId();
	if (publicId != null) {
		printWriter.print(" PUBLIC \""); //$NON-NLS-1$
		printWriter.print(publicId);
		printWriter.print("\" \""); //$NON-NLS-1$
		printWriter.print(systemId);
		printWriter.print('\"');
	} else if (systemId != null) {
		printWriter.print(" SYSTEM \""); //$NON-NLS-1$
		printWriter.print(systemId);
		printWriter.print('"');
	}

	String internalSubset = node.getInternalSubset();
	if (internalSubset != null) {
		printWriter.println(" ["); //$NON-NLS-1$
		printWriter.print(internalSubset);
		printWriter.print(']');
	}
	printWriter.println('>');
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:26,代码来源:DomWriter.java

示例5: getDirectory

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
public File getDirectory(String targetProject, String targetPackage)
        throws ShellException {
    // targetProject is interpreted as a directory that must exist
    //
    // targetPackage is interpreted as a sub directory, but in package
    // format (with dots instead of slashes). The sub directory will be
    // created
    // if it does not already exist

    File project = new File(targetProject);
    if (!project.isDirectory()) {
        throw new ShellException(getString("Warning.9", //$NON-NLS-1$
                targetProject));
    }

    StringBuilder sb = new StringBuilder();
    StringTokenizer st = new StringTokenizer(targetPackage, "."); //$NON-NLS-1$
    while (st.hasMoreTokens()) {
        sb.append(st.nextToken());
        sb.append(File.separatorChar);
    }

    File directory = new File(project, sb.toString());
    if (!directory.isDirectory()) {
        boolean rc = directory.mkdirs();
        if (!rc) {
            throw new ShellException(getString("Warning.10", //$NON-NLS-1$
                    directory.getAbsolutePath()));
        }
    }

    return directory;
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:34,代码来源:DefaultShellCallback.java

示例6: getDirectory

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
public File getDirectory(String targetProject, String targetPackage) throws ShellException {
    // targetProject is interpreted as a directory that must exist
    //
    // targetPackage is interpreted as a sub directory, but in package
    // format (with dots instead of slashes). The sub directory will be
    // created
    // if it does not already exist

    File project = new File(targetProject);
    if (!project.isDirectory()) {
        throw new ShellException(getString("Warning.9", targetProject));
    }

    StringBuilder sb = new StringBuilder();
    StringTokenizer st = new StringTokenizer(targetPackage, ".");
    while (st.hasMoreTokens()) {
        sb.append(st.nextToken());
        sb.append(File.separatorChar);
    }

    File directory = new File(project, sb.toString());
    if (!directory.isDirectory()) {
        boolean rc = directory.mkdirs();
        if (!rc) {
            throw new ShellException(getString("Warning.10", directory.getAbsolutePath()));
        }
    }

    return directory;
}
 
开发者ID:itfsw,项目名称:mybatis-generator-plugin,代码行数:31,代码来源:AbstractShellCallback.java

示例7: getDirectory

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
@Override
public File getDirectory(String targetProject, String targetPackage)
        throws ShellException {
    // targetProject is interpreted as a directory that must exist
    //
    // targetPackage is interpreted as a sub directory, but in package
    // format (with dots instead of slashes). The sub directory will be
    // created
    // if it does not already exist

    File project = new File(targetProject);
    if (!project.isDirectory()) {
        throw new ShellException(getString("Warning.9", //$NON-NLS-1$
                targetProject));
    }

    StringBuilder sb = new StringBuilder();
    StringTokenizer st = new StringTokenizer(targetPackage, "."); //$NON-NLS-1$
    while (st.hasMoreTokens()) {
        sb.append(st.nextToken());
        sb.append(File.separatorChar);
    }

    File directory = new File(project, sb.toString());
    if (!directory.isDirectory()) {
        boolean rc = directory.mkdirs();
        if (!rc) {
            throw new ShellException(getString("Warning.10", //$NON-NLS-1$
                    directory.getAbsolutePath()));
        }
    }

    return directory;
}
 
开发者ID:nextyu,项目名称:summer-mybatis-generator,代码行数:35,代码来源:DefaultShellCallback.java

示例8: toString

import org.mybatis.generator.exception.ShellException; //导入依赖的package包/类
public synchronized String toString(Document document)
        throws ShellException {
    StringWriter sw = new StringWriter();
    printWriter = new PrintWriter(sw);
    write(document);
    String s = sw.toString();
    return s;
}
 
开发者ID:funny5258,项目名称:autocode,代码行数:9,代码来源:DomWriter.java


注:本文中的org.mybatis.generator.exception.ShellException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。