}
return;
}
boolean found = false;
JavaParameter javaParam = javaMethod.getParameterByName( paramName );
if ( javaParam == null )
{
// is generic?
TypeVariable[] typeParams = javaMethod.getTypeParameters();
for (TypeVariable typeParam : typeParams) {
if (typeParam.getGenericValue().equals(paramName)) {
found = true;
}
}
}
else
{
found = true;
}
if ( !found )
{
if ( getLog().isWarnEnabled() )
{
getLog().warn(
"Fixed unknown param '" + paramName + "' defined in " + getJavaMethodAsString( javaMethod ) );
}
if ( sb.toString().endsWith( EOL ) )
{
sb.delete( sb.toString().lastIndexOf( EOL ), sb.toString().length() );
}
}
else
{
String originalJavadocTag = javaEntityTags.getJavadocParamTag( paramName );
if ( originalJavadocTag != null )
{
sb.append( originalJavadocTag );
String s = "@" + PARAM_TAG + " " + paramName;
if ( StringUtils.removeDuplicateWhitespace( originalJavadocTag ).trim().endsWith( s ) )
{
sb.append( " " );
sb.append( getDefaultJavadocForType( javaParam.getType() ) );
}
}
}
}