本文整理汇总了Java中com.sun.tools.internal.ws.processor.model.Parameter类的典型用法代码示例。如果您正苦于以下问题:Java Parameter类的具体用法?Java Parameter怎么用?Java Parameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Parameter类属于com.sun.tools.internal.ws.processor.model包,在下文中一共展示了Parameter类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的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: createUnwrappedParameters
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
/**
* This method uses JAXBStructured type (wrapper style operations) and
* unwraps it to create list of parameters.
*
*
* @param jaxbType instance of JAXBType, could be JAXBStructured type.
* @param block The Block (body/Header/Attachment) to which the created Parameter belong.
* @return list of Parameters
*/
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
Block block) {
List<Parameter> paramList = new ArrayList<Parameter>();
JAXBStructuredType type = null;
if (!(jaxbType instanceof JAXBStructuredType))
type = createJAXBStructureType(jaxbType);
else
type = (JAXBStructuredType) jaxbType;
JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
.getRealName(), true, type);
type.setJavaType(jst);
block.setType(type);
List memberList = jaxbType.getWrapperChildren();
Iterator props = memberList.iterator();
while (props.hasNext()) {
JAXBProperty prop = (JAXBProperty) props.next();
paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
jst));
}
return paramList;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:ModelerUtils.java
示例3: createUnwrappedParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
/**
* @param prop
* @param jaxbType
* @param block
* @return unwrapped parameter
*/
private static Parameter createUnwrappedParameter(JAXBProperty prop,
JAXBType jaxbType, Block block, JAXBStructuredType type,
JavaStructureType jst) {
QName elementName = prop.getElementName();
JavaType javaType = new JavaSimpleType(prop.getType());
JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
JavaStructureMember jsm = new JavaStructureMember(elementName
.getLocalPart(), javaType, eType);
eType.setJavaStructureMember(jsm);
jst.add(jsm);
eType.setProperty(prop);
type.add(eType);
JAXBType t = new JAXBType(elementName, javaType, jaxbType
.getJaxbMapping(), jaxbType.getJaxbModel());
t.setUnwrapped(true);
Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
parameter.setEmbedded(true);
return parameter;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:ModelerUtils.java
示例4: getRawTypeName
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
public static QName getRawTypeName(Parameter parameter) {
String name = parameter.getName();
if (parameter.getType() instanceof JAXBType) {
JAXBType jt = (JAXBType)parameter.getType();
if (jt.isUnwrappable()) {
List<JAXBProperty> props = jt.getWrapperChildren();
for(JAXBProperty prop: props) {
if (prop.getName().equals(name)) {
return prop.getRawTypeName();
}
}
}
}
return null;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:ModelerUtils.java
示例5: addParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的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
示例6: createUnwrappedParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
/**
* @param prop
* @param jaxbType
* @param block
* @return
*/
private static Parameter createUnwrappedParameter(JAXBProperty prop,
JAXBType jaxbType, Block block, JAXBStructuredType type,
JavaStructureType jst) {
QName elementName = prop.getElementName();
JavaType javaType = new JavaSimpleType(prop.getType());
JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
JavaStructureMember jsm = new JavaStructureMember(elementName
.getLocalPart(), javaType, eType);
eType.setJavaStructureMember(jsm);
jst.add(jsm);
eType.setProperty(prop);
type.add(eType);
JAXBType t = new JAXBType(elementName, javaType, jaxbType
.getJaxbMapping(), jaxbType.getJaxbModel());
t.setUnwrapped(true);
Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
parameter.setEmbedded(true);
return parameter;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:26,代码来源:ModelerUtils.java
示例7: getParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
private Parameter getParameter(String paramName){
for (JavaParameter parameter : parameters) {
if (paramName.equals(parameter.getName())) {
return parameter.getParameter();
}
}
return null;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:JavaMethod.java
示例8: JavaParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
public JavaParameter(String name, JavaType type, Parameter parameter,
boolean holder) {
this.name = name;
this.type = type;
this.parameter = parameter;
this.holder = holder;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:JavaParameter.java
示例9: createRpcLitParameters
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();
List<Parameter> parameters = new ArrayList<Parameter>();
for(MessagePart part : message.getParts()){
if(!ModelerUtils.isBoundToSOAPBody(part))
continue;
QName name = part.getDescriptor();
TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
if(typeAndAnn == null){
String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
part.getName(), msgQName));
throw new AbortException();
}
String type = typeAndAnn.getTypeClass().fullName();
type = ClassNameInfo.getGenericClass(type);
RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
param.setJavaType(javaType);
rpcStruct.addRpcLitMember(param);
Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
parameter.setEmbedded(true);
parameters.add(parameter);
}
return parameters;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ModelerUtils.java
示例10: createParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
/**
* Called for non-wrapper style operations. It returns a Parameter constructed
* using the JAXBType and the Block.
*
* @param partName typically wsdl:part or any name to be given to the parameter
* @param jaxbType type of Parameter
* @param block Block to which the parameter belongs to
* @return Parameter created.
*/
public static Parameter createParameter(String partName, AbstractType jaxbType,
Block block) {
Parameter parameter = new Parameter(partName, block.getEntity());
parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
partName);
parameter.setEmbedded(false);
parameter.setType(jaxbType);
parameter.setTypeName(jaxbType.getJavaType().getType().getName());
parameter.setBlock(block);
return parameter;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:ModelerUtils.java
示例11: getParameter
import com.sun.tools.internal.ws.processor.model.Parameter; //导入依赖的package包/类
/**
* Get Parameter from the list of parameters.
*
* @param paramName
* @param parameters
* @return the Parameter with name paramName from parameters
*/
public static Parameter getParameter(String paramName, List<Parameter> parameters){
if(parameters == null)
return null;
for(Parameter param: parameters){
//if(param.getName().equals("_return") && paramName.equals("return") || param.getName().equals(paramName)) {
if(param.getName().equals(paramName)){
return param;
}
}
return null;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:ModelerUtils.java
注:本文中的com.sun.tools.internal.ws.processor.model.Parameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论