本文整理汇总了Java中com.sun.tools.internal.ws.resources.WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY属性的典型用法代码示例。如果您正苦于以下问题:Java WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY属性的具体用法?Java WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY怎么用?Java WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.tools.internal.ws.resources.WscompileMessages
的用法示例。
在下文中一共展示了WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseArguments
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {
int j = super.parseArguments(args, i);
if (args[i].equals(SERVICENAME_OPTION)) {
serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
}
if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
}
return 2;
} else if (args[i].equals(PORTNAME_OPTION)) {
portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
}
if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
}
return 2;
} else if (args[i].equals("-r")) {
nonclassDestDir = new File(requireArgument("-r", args, ++i));
if (!nonclassDestDir.exists()) {
throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
}
return 2;
} else if (args[i].startsWith("-wsdl")) {
genWsdl = true;
//String value = requireArgument("-wsdl", args, ++i).substring(5);
String value = args[i].substring(5);
int index = value.indexOf(':');
if (index == 0) {
value = value.substring(1);
index = value.indexOf('/');
if (index == -1) {
protocol = value;
} else {
protocol = value.substring(0, index);
}
protocolSet = true;
}
return 1;
} else if (args[i].equals("-XwsgenReport")) {
// undocumented switch for the test harness
wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
return 2;
} else if (args[i].equals("-Xdonotoverwrite")) {
doNotOverWrite = true;
return 1;
} else if (args[i].equals("-inlineSchemas")) {
inlineSchemas = true;
return 1;
} else if ("-x".equals(args[i])) {
externalMetadataFiles.add(requireArgument("-x", args, ++i));
return 1;
}
return j;
}
示例2: parseArguments
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {
int j = super.parseArguments(args, i);
if (args[i].equals(SERVICENAME_OPTION)) {
serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
}
if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
}
return 2;
} else if (args[i].equals(PORTNAME_OPTION)) {
portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
}
if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
}
return 2;
} else if (args[i].equals("-r")) {
nonclassDestDir = new File(requireArgument("-r", args, ++i));
if (!nonclassDestDir.exists()) {
throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
}
return 2;
} else if (args[i].equals("-classpath") || args[i].equals("-cp")) {
classpath = requireArgument("-classpath", args, ++i) + File.pathSeparator + System.getProperty("java.class.path");
return 2;
} else if (args[i].startsWith("-wsdl")) {
genWsdl = true;
//String value = requireArgument("-wsdl", args, ++i).substring(5);
String value = args[i].substring(5);
int index = value.indexOf(':');
if (index == 0) {
value = value.substring(1);
index = value.indexOf('/');
if (index == -1) {
protocol = value;
} else {
protocol = value.substring(0, index);
}
protocolSet = true;
}
return 1;
} else if (args[i].equals("-XwsgenReport")) {
// undocumented switch for the test harness
wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
return 2;
} else if (args[i].equals("-Xdonotoverwrite")) {
doNotOverWrite = true;
return 1;
} else if (args[i].equals("-inlineSchemas")) {
inlineSchemas = true;
return 1;
}
return j;
}
示例3: 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;
}