@Override public void visitArg(final Arg element) { super.visitArg(element); currentTable.defineVariable(element.getName(), element); }
@Override public void visitArg(final Arg element) { super.visitArg(element); currentTable.defineVariable(element.getName(), element); }
for (Arg a : args) { String vt = getScalaType(a.getValueType()); String n = a.getName(); argTypes.add(vt); argNames.add(n);
for (Arg a : args) { String vt = getScalaType(a.getValueType()); String n = a.getName(); argTypes.add(vt); argNames.add(n);
@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); } }
String name = arg.getName(); if (name == null && !isNamedFunctionType(arg.getValueType())) { missing.add(new Pair<Arg, Integer>(arg, i));
String name = arg.getName(); if (name == null && !isNamedFunctionType(arg.getValueType())) { missing.add(new Pair<Arg, Integer>(arg, i));
public void visitArg(Arg e) { implode(e.getAnnotations(), "\n"); if (e.getValueType() != null) { if (e.getName() != null) { variableDeclarationToString(e.getValueType(), e.getName(), e.isVarArg()); if (e.getDefaultValue() != null) { append(" = ").append(e.getDefaultValue()); } } else { append(e.getValueType()).append(e.isVarArg() ? "..." : null); } } else { append("..."); } }
private Function createProxyCopy(Function originalMethod, Function meth) { if (isMethodExcludedFromStaticForwarding(originalMethod)) { return null; } Function proxyCopy = meth.clone(); proxyCopy.addModifiers(ModifierType.Public, ModifierType.Static); proxyCopy.reorganizeModifiers(); Expression[] args = new Expression[meth.getArgs().size()]; int i = 0; for (Arg arg : meth.getArgs()) { args[i++] = varRef(arg.getName()); } Expression val = methodCall(methodCall(null, null, classInstanceGetterName), Expression.MemberRefStyle.Dot, meth.getName().toString(), args); proxyCopy.setBody(new Block( meth.getValueType() == null || "void".equals(meth.getValueType().toString()) ? stat(val) : new Statement.Return(val))); return proxyCopy; } // protected static _class_ _CLASS_ = org.rococoa.Rococoa.createClass("NSURL", _class_.class);
private Function createProxyCopy(Function originalMethod, Function meth) { if (isMethodExcludedFromStaticForwarding(originalMethod)) { return null; } Function proxyCopy = meth.clone(); proxyCopy.addModifiers(ModifierType.Public, ModifierType.Static); proxyCopy.reorganizeModifiers(); Expression[] args = new Expression[meth.getArgs().size()]; int i = 0; for (Arg arg : meth.getArgs()) { args[i++] = varRef(arg.getName()); } Expression val = methodCall(methodCall(null, null, classInstanceGetterName), Expression.MemberRefStyle.Dot, meth.getName().toString(), args); proxyCopy.setBody(new Block( meth.getValueType() == null || "void".equals(meth.getValueType().toString()) ? stat(val) : new Statement.Return(val))); return proxyCopy; } // protected static _class_ _CLASS_ = org.rococoa.Rococoa.createClass("NSURL", _class_.class);
Function f = SyntaxUtils.as(arg.getParentElement(), Function.class); if (f != null) { name = new SimpleIdentifier(f.getName() + "_" + arg.getName()); break;
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(); } } }
int i = 0; for (Arg arg : meth.getArgs()) { args[i++] = varRef(arg.getName());
int i = 0; for (Arg arg : meth.getArgs()) { args[i++] = varRef(arg.getName());
if (functionSignature.getParentElement() instanceof Arg) { Arg arg = (Arg) functionSignature.getParentElement(); if (arg.getName() == null) { arg.setName(origName.toString()); functionSignature.getFunction().setName(null);
if (functionSignature.getParentElement() instanceof Arg) { Arg arg = (Arg) functionSignature.getParentElement(); if (arg.getName() == null) { arg.setName(origName.toString()); functionSignature.getFunction().setName(null);