本文整理汇总了Java中com.sun.tools.internal.ws.resources.ModelMessages类的典型用法代码示例。如果您正苦于以下问题:Java ModelMessages类的具体用法?Java ModelMessages怎么用?Java ModelMessages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelMessages类属于com.sun.tools.internal.ws.resources包,在下文中一共展示了ModelMessages类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addParameter
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
public void addParameter(JavaParameter param) {
// verify that this member does not already exist
if (hasParameter(param.getName())) {
if (options.isExtensionMode()) {
param.setName(getUniqueName(param.getName()));
} else {
Parameter duplicParam = getParameter(param.getName());
if(param.getParameter().isEmbedded()){
errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), param.getParameter().getEntityName()));
errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), duplicParam.getEntityName()));
} else {
errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), param.getParameter().getEntityName()));
errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), duplicParam.getEntityName()));
}
return;
}
}
parameters.add(param);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:JavaMethod.java
示例2: addParameter
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
public void addParameter(JavaParameter param) {
// verify that this member does not already exist
if (hasParameter(param.getName())) {
if(options.isExtensionMode()){
param.setName(getUniqueName(param.getName()));
}else{
Parameter duplicParam = getParameter(param.getName());
if(param.getParameter().isEmbedded()){
errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), param.getParameter().getEntityName()));
errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), duplicParam.getEntityName()));
}else{
errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), param.getParameter().getEntityName()));
errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), duplicParam.getEntityName()));
}
return;
}
}
parameters.add(param);
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:20,代码来源:JavaMethod.java
示例3: addBodyBlock
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
public void addBodyBlock(Block b) {
if (_bodyBlocks.containsKey(b.getName())) {
errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.internal.ws.wsdl.document.Message)getEntity()).getName(), b.getName()));
throw new AbortException();
}
_bodyBlocks.put(b.getName(), b);
b.setLocation(Block.BODY);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Message.java
示例4: addHeaderBlock
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
public void addHeaderBlock(Block b) {
if (_headerBlocks.containsKey(b.getName())) {
errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.internal.ws.wsdl.document.Message)getEntity()).getName(), b.getName()));
throw new AbortException();
}
_headerBlocks.put(b.getName(), b);
b.setLocation(Block.HEADER);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Message.java
示例5: addAttachmentBlock
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
/** attachment block */
public void addAttachmentBlock(Block b) {
if (_attachmentBlocks.containsKey(b.getName())) {
errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.internal.ws.wsdl.document.Message)getEntity()).getName(), b.getName()));
throw new AbortException();
}
_attachmentBlocks.put(b.getName(), b);
b.setLocation(Block.ATTACHMENT);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Message.java
示例6: addParameter
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
public void addParameter(Parameter p) {
if (_parametersByName.containsKey(p.getName())) {
errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(p.getName(), p.getName()));
throw new AbortException();
}
_parameters.add(p);
String name = p.getCustomName() != null ? p.getCustomName() : p.getName();
_parametersByName.put(name, p);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Message.java
示例7: initializeParametersByName
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
private void initializeParametersByName() {
_parametersByName = new HashMap();
if (_parameters != null) {
for (Iterator iter = _parameters.iterator(); iter.hasNext();) {
Parameter param = (Parameter) iter.next();
if (param.getName() != null &&
_parametersByName.containsKey(param.getName())) {
errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), param.getName()));
throw new AbortException();
}
_parametersByName.put(param.getName(), param);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:Message.java
示例8: getLocationString
import com.sun.tools.internal.ws.resources.ModelMessages; //导入依赖的package包/类
/**
* Returns the human readable string representation of the
* {@link org.xml.sax.Locator} part of the specified
* {@link SAXParseException}.
*
* @return non-null valid object.
*/
protected final String getLocationString( SAXParseException e ) {
if(e.getLineNumber()!=-1 || e.getSystemId()!=null) {
int line = e.getLineNumber();
return ModelMessages.CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(line==-1?"?":Integer.toString( line ),
getShortName( e.getSystemId()));
} else {
return ""; //for unkown location just return empty string
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:ErrorReceiver.java
注:本文中的com.sun.tools.internal.ws.resources.ModelMessages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论