@Override public void visitFunction(Function function) { if (!result.config.noComments) { if (!(function.getParentElement() instanceof FunctionSignature) && result.config.features.contains(GenFeatures.OriginalFunctionSignatures)) { function.moveAllCommentsBefore(); function.addToCommentBefore("Original signature : <code>" + function.computeSignature(SignatureType.Full) + "</code>"); } } // function.addToCommentBefore("File : " + Element.getFileOfAscendency(function)); super.visitFunction(function); // if (function.getValueType() != null && !function.getValueType().toString().equals("void")) // function.addToCommentBefore("@return " + Element.cleanComment(function.getValueType().toString())); }
@Override public void visitFunction(Function function) { if (!result.config.noComments) { if (!(function.getParentElement() instanceof FunctionSignature) && result.config.features.contains(GenFeatures.OriginalFunctionSignatures)) { function.moveAllCommentsBefore(); function.addToCommentBefore("Original signature : <code>" + function.computeSignature(SignatureType.Full) + "</code>"); } } // function.addToCommentBefore("File : " + Element.getFileOfAscendency(function)); super.visitFunction(function); // if (function.getValueType() != null && !function.getValueType().toString().equals("void")) // function.addToCommentBefore("@return " + Element.cleanComment(function.getValueType().toString())); }
@Override public void visitArg(Arg arg) { super.visitArg(arg); if (arg.getName() == null) { return; } if (!result.config.features.contains(GenFeatures.FunctionArgsJavaDoc)) { return; } String ca = arg.getCommentAfter(), cb = arg.getCommentBefore(); if (ca == null && cb == null) { return; } Function f = arg.findParentOfType(Function.class); if (f == null) { return; } ca = cleanCom(ca); cb = cleanCom(cb); if (!result.config.noComments) { f.addToCommentBefore("@param " + arg.getName() + " " + StringUtils.implode(new String[]{ca, cb}, "<br>")); } arg.setCommentAfter(null); arg.setCommentBefore(null); } }
@Override public void visitArg(Arg arg) { super.visitArg(arg); if (arg.getName() == null) { return; } if (!result.config.features.contains(GenFeatures.FunctionArgsJavaDoc)) { return; } String ca = arg.getCommentAfter(), cb = arg.getCommentBefore(); if (ca == null && cb == null) { return; } Function f = arg.findParentOfType(Function.class); if (f == null) { return; } ca = cleanCom(ca); cb = cleanCom(cb); if (!result.config.noComments) { f.addToCommentBefore("@param " + arg.getName() + " " + StringUtils.implode(new String[]{ca, cb}, "<br>")); } arg.setCommentAfter(null); arg.setCommentBefore(null); } }
protected void collectParamComments(Function f) { for (Arg arg : f.getArgs()) { arg.moveAllCommentsBefore(); TypeRef argType = arg.getValueType(); if (argType != null) { if (!result.config.noComments) { argType.moveAllCommentsBefore(); arg.addToCommentBefore(argType.getCommentBefore()); } argType.stripDetails(); } if (arg.getCommentBefore() != null) { if (!result.config.noComments) { f.addToCommentBefore("@param " + arg.getName() + " " + Element.cleanComment(arg.getCommentBefore())); } arg.stripDetails(); } } }
protected void collectParamComments(Function f) { for (Arg arg : f.getArgs()) { arg.moveAllCommentsBefore(); TypeRef argType = arg.getValueType(); if (argType != null) { if (!result.config.noComments) { argType.moveAllCommentsBefore(); arg.addToCommentBefore(argType.getCommentBefore()); } argType.stripDetails(); } if (arg.getCommentBefore() != null) { if (!result.config.noComments) { f.addToCommentBefore("@param " + arg.getName() + " " + Element.cleanComment(arg.getCommentBefore())); } arg.stripDetails(); } } }
createCopy.addToCommentBefore("@see #" + meth.computeSignature(SignatureType.JavaStyle)); createCopy.setName(ident("create" + name.substring("init".length()))); createCopy.addModifiers(ModifierType.Public, ModifierType.Static);
nativeMethod.addToCommentBefore("TRANSLATION OF BODY FAILED: " + ex);
createCopy.addToCommentBefore("@see #" + meth.computeSignature(SignatureType.JavaStyle)); createCopy.setName(ident("create" + name.substring("init".length()))); createCopy.addModifiers(ModifierType.Public, ModifierType.Static);
nativeMethod.addToCommentBefore("TRANSLATION OF BODY FAILED: " + ex);
if (!result.config.noComments) { if (!commentBits.isEmpty()) { unionValConstr.addToCommentBefore("@param " + name + " " + StringUtils.implode(commentBits, ", or ")); Identifier parentTgName = typeConverter().getTaggedTypeIdentifierInJava(parent); if (!result.config.noComments) { fieldsConstr.addToCommentBefore("@param " + name + " @see " + parentTgName + "#" + vd.getDeclarators().get(0).resolveName()); if (!result.config.noComments) { if (vd.getCommentBefore() != null) { fieldsConstr.addToCommentBefore("@param " + uname + " " + vd.getCommentBefore());
if (!result.config.noComments) { if (!commentBits.isEmpty()) { unionValConstr.addToCommentBefore("@param " + name + " " + StringUtils.implode(commentBits, ", or ")); Identifier parentTgName = typeConverter().getTaggedTypeIdentifierInJava(parent); if (!result.config.noComments) { fieldsConstr.addToCommentBefore("@param " + name + " @see " + parentTgName + "#" + vd.getDeclarators().get(0).resolveName()); if (!result.config.noComments) { if (vd.getCommentBefore() != null) { fieldsConstr.addToCommentBefore("@param " + uname + " " + vd.getCommentBefore());
con.getInputStream().close(); MessageFormat displayFormat = mf.getFirst(); natFunc.addToCommentBefore("@see <a href=\"" + url + "\">" + displayFormat.format(name) + "</a>"); break; } catch (Exception ex) { if (!result.config.noComments) { if (primOrBufSign.equals(bufSign)) { natFunc.addToCommentBefore(Arrays.asList("@deprecated use the safer method {@link #" + primOrBufSign + "} instead")); } else { natFunc.addToCommentBefore(Arrays.asList("@deprecated use the safer methods {@link #" + primOrBufSign + "} and {@link #" + bufSign + "} instead"));
con.getInputStream().close(); MessageFormat displayFormat = mf.getFirst(); natFunc.addToCommentBefore("@see <a href=\"" + url + "\">" + displayFormat.format(name) + "</a>"); break; } catch (Exception ex) { if (!result.config.noComments) { if (primOrBufSign.equals(bufSign)) { natFunc.addToCommentBefore(Arrays.asList("@deprecated use the safer method {@link #" + primOrBufSign + "} instead")); } else { natFunc.addToCommentBefore(Arrays.asList("@deprecated use the safer methods {@link #" + primOrBufSign + "} and {@link #" + bufSign + "} instead"));