本文整理汇总了Java中com.sun.tools.internal.ws.processor.generator.Names类的典型用法代码示例。如果您正苦于以下问题:Java Names类的具体用法?Java Names怎么用?Java Names使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Names类属于com.sun.tools.internal.ws.processor.generator包,在下文中一共展示了Names类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: applyOperationNameCustomization
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
private boolean applyOperationNameCustomization() {
JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.portTypeOperation, JAXWSBinding.class);
String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null;
if (operationName != null) {
if (Names.isJavaReservedWord(operationName)) {
if (options.isExtensionMode()) {
warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
} else {
error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
}
return false;
}
info.operation.setCustomizedName(operationName);
}
if (Names.isJavaReservedWord(info.operation.getJavaMethodName())) {
if (options.isExtensionMode()) {
warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
} else {
error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
}
return false;
}
return true;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:WSDLModeler.java
示例2: applyPortMethodCustomization
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
/**
*
* @param port
* @param wsdlPort
*/
protected void applyPortMethodCustomization(Port port, com.sun.tools.internal.ws.wsdl.document.Port wsdlPort) {
if (isProvider(wsdlPort)) {
return;
}
JAXWSBinding jaxwsBinding = (JAXWSBinding)getExtensionOfType(wsdlPort, JAXWSBinding.class);
String portMethodName = (jaxwsBinding != null)?((jaxwsBinding.getMethodName() != null)?jaxwsBinding.getMethodName().getName():null):null;
if(portMethodName != null){
port.setPortGetter(portMethodName);
}else{
portMethodName = Names.getPortName(port);
portMethodName = BindingHelper.mangleNameToClassName(portMethodName);
port.setPortGetter("get"+portMethodName);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:WSDLModelerBase.java
示例3: applyOperationNameCustomization
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
private boolean applyOperationNameCustomization() {
JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.portTypeOperation, JAXWSBinding.class);
String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null;
if (operationName != null) {
if (Names.isJavaReservedWord(operationName)) {
if (options.isExtensionMode())
warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
else
error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
return false;
}
info.operation.setCustomizedName(operationName);
}
if (Names.isJavaReservedWord(info.operation.getJavaMethodName())) {
if (options.isExtensionMode())
warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
else
error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
return false;
}
return true;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:25,代码来源:WSDLModeler.java
示例4: applyPortMethodCustomization
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
/**
*
* @param port
* @param wsdlPort
*/
protected void applyPortMethodCustomization(Port port, com.sun.tools.internal.ws.wsdl.document.Port wsdlPort) {
if(isProvider(wsdlPort))
return;
JAXWSBinding jaxwsBinding = (JAXWSBinding)getExtensionOfType(wsdlPort, JAXWSBinding.class);
String portMethodName = (jaxwsBinding != null)?((jaxwsBinding.getMethodName() != null)?jaxwsBinding.getMethodName().getName():null):null;
if(portMethodName != null){
port.setPortGetter(portMethodName);
}else{
portMethodName = Names.getPortName(port);
portMethodName = JAXBRIContext.mangleNameToClassName(portMethodName);
port.setPortGetter("get"+portMethodName);
}
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:21,代码来源:WSDLModelerBase.java
示例5: getCustomizedOperationName
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
private String getCustomizedOperationName(Operation operation) {
JAXWSBinding jaxwsCustomization = (JAXWSBinding)getExtensionOfType(operation, JAXWSBinding.class);
String operationName = (jaxwsCustomization != null)?((jaxwsCustomization.getMethodName() != null)?jaxwsCustomization.getMethodName().getName():null):null;
if(operationName != null){
if(Names.isJavaReservedWord(operationName)){
return null;
}
return operationName;
}
return operation.getName();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:PseudoSchemaBuilder.java
示例6: getJavaNameForOperation
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
protected String getJavaNameForOperation(Operation operation) {
String name = operation.getJavaMethodName();
if (Names.isJavaReservedWord(name)) {
name = "_" + name;
}
return name;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:WSDLModeler.java
示例7: createJavaExceptionFromLiteralType
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) {
JAXBType faultType = (JAXBType) fault.getBlock().getType();
String exceptionName = fault.getName();
// use fault namespace attribute
JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName(
fault.getBlock().getName().getNamespaceURI(),
fault.getName()));
QName memberName = fault.getElementName();
JAXBElementMember jaxbMember =
new JAXBElementMember(memberName, faultType);
//jaxbMember.setNillable(faultType.isNillable());
String javaMemberName = getLiteralJavaMemberName(fault);
JavaStructureMember javaMember = new JavaStructureMember(
javaMemberName,
faultType.getJavaType(),
jaxbMember);
jaxbMember.setJavaStructureMember(javaMember);
javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember));
javaMember.setInherited(false);
jaxbMember.setJavaStructureMember(javaMember);
jaxbStruct.add(jaxbMember);
if (isConflictingExceptionClassName(exceptionName)) {
exceptionName += "_Exception";
}
JavaException existingJavaException = _javaExceptions.get(exceptionName);
if (existingJavaException != null) {
if (existingJavaException.getName().equals(exceptionName)) {
if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName())
|| ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) {
// we have mapped this fault already
if (faultType instanceof JAXBStructuredType) {
fault.getBlock().setType((JAXBType) existingJavaException.getOwner());
}
fault.setJavaException(existingJavaException);
return false;
}
}
}
JavaException javaException = new JavaException(exceptionName, false, jaxbStruct);
javaException.add(javaMember);
jaxbStruct.setJavaType(javaException);
_javaExceptions.put(javaException.getName(), javaException);
fault.setJavaException(javaException);
return true;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:55,代码来源:WSDLModeler.java
示例8: addGeneratedFile
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
private void addGeneratedFile(String requestClassName) {
File file = new File(DirectoryUtil.getOutputDirectoryFor(requestClassName, builder.getSourceDir()),
Names.stripQualifier(requestClassName) + GeneratorConstants.JAVA_SRC_SUFFIX.getValue());
builder.getOptions().addGeneratedFile(file);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:WebServiceWrapperGenerator.java
示例9: getResponseName
import com.sun.tools.internal.ws.processor.generator.Names; //导入依赖的package包/类
public String getResponseName(String operationName) {
return Names.getResponseName(operationName);
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:4,代码来源:WebServiceAP.java
注:本文中的com.sun.tools.internal.ws.processor.generator.Names类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论