本文整理汇总了Java中com.sun.xml.internal.ws.spi.db.BindingHelper.mangleNameToVariableName方法的典型用法代码示例。如果您正苦于以下问题:Java BindingHelper.mangleNameToVariableName方法的具体用法?Java BindingHelper.mangleNameToVariableName怎么用?Java BindingHelper.mangleNameToVariableName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.ws.spi.db.BindingHelper
的用法示例。
在下文中一共展示了BindingHelper.mangleNameToVariableName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPropertyName
import com.sun.xml.internal.ws.spi.db.BindingHelper; //导入方法依赖的package包/类
/**
* Gets the property name by mangling using JAX-WS rules
* @param name to be mangled
* @return property name
*/
private static String getPropertyName(String name) {
String propertyName = BindingHelper.mangleNameToVariableName(name);
//We wont have to do this if JAXBRIContext.mangleNameToVariableName() takes
//care of mangling java identifiers
return getJavaReservedVarialbeName(propertyName);
}
示例2: getJavaMethodName
import com.sun.xml.internal.ws.spi.db.BindingHelper; //导入方法依赖的package包/类
public String getJavaMethodName(){
//if JavaMethod is created return the name
if(_javaMethod != null){
return _javaMethod.getName();
}
//return the customized operation name if any without mangling
if(customizedName != null){
return customizedName;
}
return BindingHelper.mangleNameToVariableName(_name.getLocalPart());
}
示例3: createJavaMethodForAsyncOperation
import com.sun.xml.internal.ws.spi.db.BindingHelper; //导入方法依赖的package包/类
private void createJavaMethodForAsyncOperation(Port port, Operation operation,
JavaInterface intf) {
String candidateName = getJavaNameForOperation(operation);
JavaMethod method = new JavaMethod(candidateName, options, errReceiver);
assert (operation.getRequest() != null);
Response response = operation.getResponse();
// build a signature of the form "opName%arg1type%arg2type%...%argntype so that we
// detect overloading conflicts in the generated java interface/classes
for (Iterator iter = operation.getRequest().getParameters(); iter.hasNext();) {
Parameter parameter = (Parameter) iter.next();
if (parameter.getJavaParameter() != null) {
error(operation.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION(operation.getName().getLocalPart()));
}
JavaType parameterType = parameter.getType().getJavaType();
JavaParameter javaParameter =
new JavaParameter(
BindingHelper.mangleNameToVariableName(parameter.getName()),
parameterType,
parameter,
parameter.getLinkedParameter() != null);
if (javaParameter.isHolder()) {
javaParameter.setHolderName(javax.xml.ws.Holder.class.getName());
}
method.addParameter(javaParameter);
parameter.setJavaParameter(javaParameter);
}
if (response != null) {
String resultParameterName =
(String) operation.getProperty(WSDL_RESULT_PARAMETER);
Parameter resultParameter =
response.getParameterByName(resultParameterName);
JavaType returnType = resultParameter.getType().getJavaType();
method.setReturnType(returnType);
}
operation.setJavaMethod(method);
intf.addMethod(method);
}