Methods Summary |
---|
protected void | generateClass()
jw.write("public interface ", className, " extends java.rmi.Remote ");
jw.begin();
JavaInterface intf = port.getJavaInterface();
for (Iterator it = intf.getMethods(); it.hasNext();) {
JavaMethod method = (JavaMethod) it.next();
generateUserMethod(method);
}
jw.end(); // end interface
|
protected void | generateUserMethod(JavaMethod method)
String methodName = method.getName();
JavaType returnType = getExpandedReturnType(method);
String returnTypeName = javaTypeToString(returnType);
boolean voidReturnType = (returnType == null || "void".equals(returnTypeName));
jw.write("public ");
if (voidReturnType) {
jw.write("void");
} else {
jw.write(returnTypeName);
}
jw.write(" ");
jw.write(methodName);
jw.write("(");
jw.setFirst(", ");
List parameterList = getExpandedParametersList(method);
for (Iterator parameters = parameterList.iterator(); parameters.hasNext(); ) {
JavaParameter parameter = (JavaParameter) parameters.next();
JavaType parameterType = parameter.getType();
String paramTypeName = javaTypeToString(parameterType);
jw.writeNext(paramTypeName, " ", parameter.getName());
}
jw.write(")");
jw.write(" throws java.rmi.RemoteException");
for (Iterator exceptions = method.getExceptions();
exceptions.hasNext(); ) {
String exceptionName = (String) exceptions.next();
jw.write(", ");
jw.write(exceptionName);
}
jw.eol();
jw.cr();
|
protected java.lang.String | getFullClassName()
JavaInterface intf = port.getJavaInterface();
return env.getNames().customJavaTypeClassName(intf);
|
protected java.io.File | getSourceFile()
return env.getNames().sourceFileForClass(fullClassName, fullClassName, sourceDir, env);
|
protected java.lang.String | getSourceFileType()
return GeneratorConstants.FILE_TYPE_REMOTE_INTERFACE;
|