@Override public Void visitParam(ParamTree paramTree, Void unused) { if (paramTree.isTypeParameter() && paramTree.getName().getName().contentEquals(name)) { DocSourcePositions positions = JavacTrees.instance(state.context).getSourcePositions(); CompilationUnitTree compilationUnitTree = state.getPath().getCompilationUnit(); int startPos = (int) positions.getStartPosition( compilationUnitTree, docCommentTree, paramTree.getName()); int endPos = (int) positions.getEndPosition( compilationUnitTree, docCommentTree, paramTree.getName()); fixBuilder.replace(startPos, endPos, typeVarReplacement); } return super.visitParam(paramTree, null); } },
@Override public Void visitParam(ParamTree paramTree, Void unused) { if (paramTree.isTypeParameter() && paramTree.getName().getName().contentEquals(name)) { DocSourcePositions positions = JavacTrees.instance(state.context).getSourcePositions(); CompilationUnitTree compilationUnitTree = state.getPath().getCompilationUnit(); int startPos = (int) positions.getStartPosition( compilationUnitTree, docCommentTree, paramTree.getName()); int endPos = (int) positions.getEndPosition( compilationUnitTree, docCommentTree, paramTree.getName()); fixBuilder.replace(startPos, endPos, typeVarReplacement); } return super.visitParam(paramTree, null); } },