use of com.sun.tools.ws.processor.model.java.JavaStructureType in project metro-jax-ws by eclipse-ee4j.
the class ModelerUtils method createUnwrappedParameters.
/**
* 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<>();
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;
}
Aggregations