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


Java WscompileMessages.WSIMPORT_ILLEGAL_TARGET_VERSION属性代码示例

本文整理汇总了Java中com.sun.tools.internal.ws.resources.WscompileMessages.WSIMPORT_ILLEGAL_TARGET_VERSION属性的典型用法代码示例。如果您正苦于以下问题:Java WscompileMessages.WSIMPORT_ILLEGAL_TARGET_VERSION属性的具体用法?Java WscompileMessages.WSIMPORT_ILLEGAL_TARGET_VERSION怎么用?Java WscompileMessages.WSIMPORT_ILLEGAL_TARGET_VERSION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.tools.internal.ws.resources.WscompileMessages的用法示例。


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

示例1: parseArguments

/**
 * Parses an option <code>args[i]</code> and return
 * the number of tokens consumed.
 *
 * @return
 *      0 if the argument is not understood. Returning 0
 *      will let the caller report an error.
 * @exception BadCommandLineException
 *      If the callee wants to provide a custom message for an error.
 */
protected int parseArguments(String[] args, int i) throws BadCommandLineException {
    if (args[i].equals("-g")) {
        debug = true;
        return 1;
    } else if (args[i].equals("-Xdebug")) {
        debugMode = true;
        return 1;
    } else if (args[i].equals("-Xendorsed")) {
        // this option is processed much earlier, so just ignore.
        return 1;
    } else if (args[i].equals("-verbose")) {
        verbose = true;
        return 1;
    } else if (args[i].equals("-quiet")) {
        quiet = true;
        return 1;
    } else if (args[i].equals("-keep")) {
        keep = true;
        return 1;
    }  else if (args[i].equals("-target")) {
        String token = requireArgument("-target", args, ++i);
        target = Target.parse(token);
        if(target == null)
            throw new BadCommandLineException(WscompileMessages.WSIMPORT_ILLEGAL_TARGET_VERSION(token));
        return 2;
    }else if (args[i].equals("-d")) {
        destDir = new File(requireArgument("-d", args, ++i));
        if (!destDir.exists())
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(destDir.getPath()));
        return 2;
    } else if (args[i].equals("-s")) {
        sourceDir = new File(requireArgument("-s", args, ++i));
        keep = true;
        if (!sourceDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(sourceDir.getPath()));
        }
        return 2;
    } else if (args[i].equals("-extension")) {
        compatibilityMode = EXTENSION;
        return 1;
    } else if (args[i].startsWith("-help")) {
        WeAreDone done = new WeAreDone();
        done.initOptions(this);
        throw done;
    } else if (args[i].equals("-Xnocompile")) {
        // -nocompile implies -keep. this is undocumented switch.
        nocompile = true;
        keep = true;
        return 1;
    }
    return 0;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:62,代码来源:Options.java


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