}
return InternalUtils.isVarArg(path.getParentPath().getLeaf());
}
private boolean argOfMainMethod(GenerationContext<Void> context) {
TreePath path = context.getCurrentPath();
if (!(path.getParentPath().getLeaf() instanceof VariableTree)) {
return false;
}
if (!(path.getParentPath().getParentPath().getLeaf() instanceof MethodTree)) {
return false;
}
MethodTree method = (MethodTree) path.getParentPath().getParentPath().getLeaf();
if (!(method.getParameters().size() == 1 && method.getParameters().get(0) == path.getParentPath().getLeaf())) {
// make sure we reference the first parameter
return false;
}
return ClassWriter.isMainMethod(method);
}