Methods Summary |
---|
protected Localizable | getMessage(java.lang.String key, java.lang.String arg)
return messageFactory.getMessage(key, new Object[] {arg});
|
protected Localizable | getMessage(java.lang.String key, java.lang.String arg1, java.lang.String arg2)
return messageFactory.getMessage(key, new Object[] {arg1, arg2});
|
protected java.lang.String | javaTypeToString(JavaType type, Port port)
if (type == null)
return null;
String result;
if (type.isHolder())
result = env.getNames().holderClassName(port, type);
else
result = env.getNames().typeClassName(type);
return result;
|
public void | mungeTo1_0(com.sun.xml.rpc.processor.model.Service service)
for (Iterator it = service.getPorts(); it.hasNext(); ) {
Port port = (Port) it.next();
mungeTo1_0(port);
}
|
protected void | mungeTo1_0(Port port)
for (Iterator operations = port.getOperations(); operations.hasNext(); ) {
Operation operation = (Operation) operations.next();
mungeTo1_0(operation, port);
}
|
protected void | mungeTo1_0(Operation operation, Port port)
JavaMethod method = operation.getJavaMethod();
//System.out.println("mungeTo1_0: method.getName="+method.getName());
JavaType returnType = method.getReturnType();
mungeTo1_0(returnType, port);
for (Iterator parameters = method.getParameters(); parameters.hasNext(); ) {
JavaParameter parameter = (JavaParameter) parameters.next();
JavaType parameterType = parameter.getType();
mungeTo1_0(parameterType, port);
}
for (Iterator faults = operation.getFaults(); faults.hasNext(); ) {
Fault fault = (Fault) faults.next();
Block faultBlock = fault.getBlock();
JavaException jexcep = fault.getJavaException();
mungeTo1_0(jexcep, port);
}
|
protected void | mungeTo1_0(JavaType type, Port port)
//System.out.println("mungeTo1_0: type="+type);
if (type == null)
return;
if (type instanceof JavaSimpleType) {
String typeName = javaTypeToString(type, port).intern();
//System.out.println("typeName="+typeName);
if (typeName == "float" || typeName == "Float" ||
typeName == "java.lang.Float" || typeName == "double" ||
typeName == "Double" || typeName == "java.lang.Double") {
//System.out.println("Found odd type: "+typeName+" name="+type.getName());
originalTypes.put(type, typeName);
type.doSetName("java.lang.String");
}
} else if (type instanceof JavaStructureType) {
JavaStructureType jst = (JavaStructureType) type;
for (Iterator members = jst.getMembers(); members.hasNext(); ) {
JavaStructureMember jsm = (JavaStructureMember) members.next();
JavaType memberType = jsm.getType();
mungeTo1_0(memberType, port);
}
} else if (type instanceof JavaArrayType) {
JavaArrayType jat = (JavaArrayType) type;
JavaType elementType = jat.getElementType();
mungeTo1_0(elementType, port);
if (originalTypes.containsKey(elementType)) {
String typeName = javaTypeToString(type, port);
//System.out.println("Changing array type, was: "+typeName);
originalTypes.put(type, typeName);
jat.doSetName(elementType.getName()+"[]");
}
} else if (type instanceof JavaEnumerationType) {
JavaEnumerationType jet = (JavaEnumerationType) type;
JavaType baseType = jet.getBaseType();
mungeTo1_0(baseType, port);
} else {
onWarning(getMessage("stubgenerator.unknownType", "mungeTo1_0", type.toString()));
}
|
protected void | onWarning(Localizable msg)
//System.err.println("Warning: "+msg);
env.warn(msg);
|
public void | perform(com.sun.xml.rpc.processor.model.Model model, com.sun.xml.rpc.processor.config.Configuration config, java.util.Properties options)
//env = config.getEnvironment();
for (Iterator it = model.getServices(); it.hasNext(); ) {
Service service = (Service) it.next();
mungeTo1_0(service);
}
|
public void | setEnvironment(com.sun.xml.rpc.processor.util.ProcessorEnvironment e)
env = e;
|