deprecate: DumpFacade will be removed in PMD 7

Refs #1801
This commit is contained in:
Andreas Dangel
2019-05-01 11:29:43 +02:00
parent 92499ed3a0
commit 1c9a73426c
9 changed files with 54 additions and 0 deletions

View File

@ -18,6 +18,23 @@ This is a {{ site.pmd.release_type }} release.
### API Changes ### API Changes
#### Deprecated APIs
##### For removal
* The `DumpFacades` in all languages, that could be used to transform a AST into a textual representation,
will be removed with PMD 7. The rule designer is a better way to inspect nodes.
* {% jdoc !q!apex::lang.apex.ast.DumpFacade %}
* {% jdoc !q!java::lang.java.ast.DumpFacade %}
* {% jdoc !q!javascript::lang.ecmascript.ast.DumpFacade %}
* {% jdoc !q!jsp::lang.jsp.ast.DumpFacade %}
* {% jdoc !q!plsql::lang.plsql.ast.DumpFacade %}
* {% jdoc !q!visualforce::lang.vf.ast.DumpFacade %}
* {% jdoc !q!vm::lang.vm.ast.AbstractVmNode#dump(String, boolean, Writer) %}
* {% jdoc !q!xml::lang.xml.ast.DumpFacade %}
* The method {% jdoc !c!core::lang.LanguageVersionHandler#getDumpFacade(Writer, String, boolean) %} will be
removed as well.
### External Contributions ### External Contributions
* [#1803](https://github.com/pmd/pmd/pull/1803): \[dart] \[cpd] Dart escape sequences - [Maikel Steneker](https://github.com/maikelsteneker) * [#1803](https://github.com/pmd/pmd/pull/1803): \[dart] \[cpd] Dart escape sequences - [Maikel Steneker](https://github.com/maikelsteneker)

View File

@ -12,6 +12,11 @@ import java.util.List;
import net.sourceforge.pmd.util.StringUtil; import net.sourceforge.pmd.util.StringUtil;
/**
*
* @deprecated This class will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/
@Deprecated
public class DumpFacade { public class DumpFacade {
private PrintWriter writer; private PrintWriter writer;

View File

@ -10,6 +10,11 @@ import java.io.Writer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
*
* @deprecated This class will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/
@Deprecated
public class DumpFacade extends JavaParserVisitorAdapter { public class DumpFacade extends JavaParserVisitorAdapter {
private PrintWriter writer; private PrintWriter writer;

View File

@ -12,6 +12,11 @@ import java.util.List;
import net.sourceforge.pmd.util.StringUtil; import net.sourceforge.pmd.util.StringUtil;
/**
*
* @deprecated This class will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/
@Deprecated
public class DumpFacade { public class DumpFacade {
private PrintWriter writer; private PrintWriter writer;

View File

@ -12,6 +12,11 @@ import java.util.List;
import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.ast.Node;
/**
*
* @deprecated This class will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/
@Deprecated
public class DumpFacade extends JspParserVisitorAdapter { public class DumpFacade extends JspParserVisitorAdapter {
private PrintWriter writer; private PrintWriter writer;

View File

@ -10,6 +10,11 @@ import java.io.Writer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
*
* @deprecated This class will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/
@Deprecated
public class DumpFacade extends PLSQLParserVisitorAdapter { public class DumpFacade extends PLSQLParserVisitorAdapter {
private PrintWriter writer; private PrintWriter writer;

View File

@ -12,6 +12,11 @@ import java.util.List;
import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.ast.Node;
/**
*
* @deprecated This class will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/
@Deprecated
public class DumpFacade extends VfParserVisitorAdapter { public class DumpFacade extends VfParserVisitorAdapter {
private PrintWriter writer; private PrintWriter writer;

View File

@ -151,7 +151,9 @@ public class AbstractVmNode extends AbstractNode implements VmNode {
* children. * children.
* *
* @param prefix * @param prefix
* @deprecated This method will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/ */
@Deprecated
public void dump(final String prefix, final boolean recurse, final Writer writer) { public void dump(final String prefix, final boolean recurse, final Writer writer) {
final PrintWriter printWriter = writer instanceof PrintWriter ? (PrintWriter) writer : new PrintWriter(writer); final PrintWriter printWriter = writer instanceof PrintWriter ? (PrintWriter) writer : new PrintWriter(writer);
printWriter.println(toString(prefix)); printWriter.println(toString(prefix));

View File

@ -14,6 +14,11 @@ import java.util.List;
import net.sourceforge.pmd.lang.ast.xpath.Attribute; import net.sourceforge.pmd.lang.ast.xpath.Attribute;
import net.sourceforge.pmd.util.StringUtil; import net.sourceforge.pmd.util.StringUtil;
/**
*
* @deprecated This class will be removed with PMD 7. The rule designer is a better way to inspect nodes.
*/
@Deprecated
public class DumpFacade { public class DumpFacade {
private PrintWriter writer; private PrintWriter writer;