forked from phoedos/pmd
Merge branch 'deprecate-token-mgr-stuff' into tmp
This commit is contained in:
@ -36,7 +36,9 @@ public interface Parser {
|
||||
* @param source
|
||||
* Reader that provides the source code to tokenize.
|
||||
* @return A TokenManager for reading token.
|
||||
* @deprecated For removal in 7.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
TokenManager getTokenManager(String fileName, Reader source);
|
||||
|
||||
|
||||
|
@ -11,5 +11,10 @@ public interface TokenManager {
|
||||
// TODO : Change the return to GenericToken in 7.0.0 - maybe even use generics TokenManager<T extends GenericToken>
|
||||
Object getNextToken();
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated For removal in 7.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
void setFileName(String fileName);
|
||||
}
|
||||
|
@ -19,10 +19,18 @@ public abstract class AbstractTokenManager {
|
||||
protected Map<Integer, String> suppressMap = new HashMap<>();
|
||||
protected String suppressMarker = PMD.SUPPRESS_MARKER;
|
||||
|
||||
/**
|
||||
* @deprecated For removal in 7.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setFileName(String fileName) {
|
||||
AbstractTokenManager.fileName.set(fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated For removal in 7.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
public static String getFileName() {
|
||||
String fileName = AbstractTokenManager.fileName.get();
|
||||
return fileName == null ? "(no file name provided)" : fileName;
|
||||
|
Reference in New Issue
Block a user