buf.append(Signature.toString(paramTypes[i]));
buf.append(Signature.getSimpleName(Signature.toString(paramTypes[i])));
	public static String genStub(IType parenttype, IMethod method, IImportsStructure imports) throws JavaModelException {		IType declaringtype= method.getDeclaringType();			StringBuffer buf= new StringBuffer();		String[] paramTypes= method.getParameterTypes();		String[] paramNames= method.getParameterNames();			int lastParam= paramTypes.length -1;				if (!method.isConstructor()) {			// java doc			buf.append("\t/**\n\t");			buf.append(" * @see "); buf.append(declaringtype.getElementName()); buf.append('#');			buf.append(method.getElementName());			buf.append('(');			for (int i= 0; i <= lastParam; i++) {				buf.append(Signature.toString(paramTypes[i]));				if (i < lastParam) {					buf.append(", ");				}			}			buf.append(")\n\t");			buf.append(" */\n\t");		} else {			buf.append("\t/**\n\t");			buf.append(" * Constructor for "); buf.append(parenttype.getElementName()); buf.append("\n\t");			buf.append(" */\n\t");		}				int flags= method.getFlags();		if (Flags.isPublic(flags) || (declaringtype.isInterface() && parenttype.isClass())) {			buf.append("public ");		} else if (Flags.isProtected(flags)) {			buf.append("protected ");		}		if (Flags.isSynchronized(flags)) {			buf.append("synchronized ");		}				if (Flags.isVolatile(flags)) {			buf.append("volatile ");		}		if (Flags.isStrictfp(flags)) {			buf.append("strictfp ");		}					if (!method.isConstructor()) {			String retTypeSig= method.getReturnType();			String retTypeFrm= Signature.toString(retTypeSig);			if (!isBuiltInType(retTypeSig)) {				resolveAndAdd(retTypeSig, declaringtype, imports);			}			buf.append(Signature.getSimpleName(retTypeFrm));			buf.append(' ');			buf.append(method.getElementName());		} else {			buf.append(parenttype.getElementName());		}		buf.append('(');		for (int i= 0; i <= lastParam; i++) {			String paramTypeSig= paramTypes[i];			String paramTypeFrm= Signature.toString(paramTypeSig);			if (!isBuiltInType(paramTypeSig)) {				resolveAndAdd(paramTypeSig, declaringtype, imports);			}			buf.append(Signature.getSimpleName(paramTypeFrm));			buf.append(' ');			buf.append(paramNames[i]);			if (i < lastParam) {				buf.append(", ");			}		}		buf.append(')');		String[] excTypes= method.getExceptionTypes();		int lastExc= excTypes.length - 1;		if (lastExc >= 0) {			buf.append(" throws ");			for (int i= 0; i <= lastExc; i++) {				String excTypeSig= excTypes[i];				String excTypeFrm= Signature.toString(excTypeSig);				resolveAndAdd(excTypeSig, declaringtype, imports);				buf.append(Signature.getSimpleName(excTypeFrm));				if (i < lastExc) {					buf.append(", ");				}			}		}		if (parenttype.isInterface()) {			buf.append(";\n\n");		} else {			buf.append(" {\n\t");			if (Flags.isAbstract(method.getFlags()) || declaringtype.isInterface()) {				String retTypeSig= method.getReturnType();				if (retTypeSig != null && !retTypeSig.equals(Signature.SIG_VOID)) {					buf.append('\t');					if (!isBuiltInType(retTypeSig) || Signature.getArrayCount(retTypeSig) > 0) {						buf.append("return null;\n\t");					} else if (retTypeSig.equals(Signature.SIG_BOOLEAN)) {						buf.append("return false;\n\t");					} else {						buf.append("return 0;\n\t");					}				}			} else {				buf.append('\t');				if (!method.isConstructor()) {					if (!Signature.SIG_VOID.equals(method.getReturnType())) {						buf.append("return ");					}					buf.append("super.");					buf.append(method.getElementName());				} else {					buf.append("super");				}				buf.append('(');							for (int i= 0; i <= lastParam; i++) {					buf.append(paramNames[i]);					if (i < lastParam) {						buf.append(", ");					}				}				buf.append(");\n\t");			}			buf.append("}\n\n");					}		return buf.toString();	}