[vm] Deprecate/Internalize VmTokenManager

Refs #2289
This commit is contained in:
Andreas Dangel
2020-03-13 09:39:07 +01:00
parent 4c1fa78192
commit 70f1f511e4
3 changed files with 20 additions and 0 deletions

View File

@ -18,6 +18,15 @@ This is a {{ site.pmd.release_type }} release.
### API Changes
#### Deprecated APIs
##### Internal API
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
* {% jdoc vm::lang.vm.VmTokenManager %}
### External Contributions
{% endtocmaker %}

View File

@ -10,6 +10,7 @@ import java.util.Map;
import net.sourceforge.pmd.annotation.InternalApi;
import net.sourceforge.pmd.lang.AbstractParser;
import net.sourceforge.pmd.lang.LanguageVersionHandler;
import net.sourceforge.pmd.lang.ParserOptions;
import net.sourceforge.pmd.lang.TokenManager;
import net.sourceforge.pmd.lang.ast.AbstractTokenManager;

View File

@ -6,11 +6,21 @@ package net.sourceforge.pmd.lang.vm;
import java.io.Reader;
import net.sourceforge.pmd.annotation.InternalApi;
import net.sourceforge.pmd.lang.LanguageVersionHandler;
import net.sourceforge.pmd.lang.Parser;
import net.sourceforge.pmd.lang.TokenManager;
import net.sourceforge.pmd.lang.ast.AbstractTokenManager;
import net.sourceforge.pmd.lang.vm.ast.VmParserTokenManager;
import net.sourceforge.pmd.lang.vm.util.VelocityCharStream;
/**
*
* @deprecated This is internal API, use {@link Parser#getTokenManager(String, Reader)} via
* {@link LanguageVersionHandler#getParser(ParserOptions)}.
*/
@Deprecated
@InternalApi
public class VmTokenManager implements TokenManager {
private final VmParserTokenManager vmParserTokenManager;