Replace package name with class name

Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
This commit is contained in:
Clément Fournier
2022-04-14 19:49:48 +02:00
committed by GitHub
parent b7c3e47591
commit 7bf44c69ac
2 changed files with 2 additions and 2 deletions

View File

@ -2759,7 +2759,7 @@ void ModuleDirective() #void:
ModuleName() ";" ) #ModuleRequiresDirective
| ( LOOKAHEAD({isKeyword("exports")}) <IDENTIFIER> packageName=VoidNameNoLookahead() {jjtThis.setPackageName(packageName);} [ LOOKAHEAD({isKeyword("to")}) <IDENTIFIER> ModuleName() ("," ModuleName())* ] ";" ) #ModuleExportsDirective
| ( LOOKAHEAD({isKeyword("opens")}) <IDENTIFIER> packageName=VoidNameNoLookahead() {jjtThis.setPackageName(packageName);} [ LOOKAHEAD({isKeyword("to")}) <IDENTIFIER> ModuleName() ("," ModuleName())* ] ";" ) #ModuleOpensDirective
| ( LOOKAHEAD({isKeyword("uses")}) <IDENTIFIER> packageName=VoidNameNoLookahead() {jjtThis.setPackageName(packageName);} ";" ) #ModuleUsesDirective
| ( LOOKAHEAD({isKeyword("uses")}) <IDENTIFIER> ClassName() ";" ) #ModuleUsesDirective
| ( LOOKAHEAD({isKeyword("provides")}) <IDENTIFIER> ClassName() LOOKAHEAD({isKeyword("with")}) <IDENTIFIER> ClassName() ("," ClassName() )* ";" ) #ModuleProvidesDirective
}

View File

@ -13,7 +13,7 @@ package net.sourceforge.pmd.lang.java.ast;
*
* </pre>
*/
public final class ASTModuleUsesDirective extends AbstractPackageNameModuleDirective {
public final class ASTModuleUsesDirective extends ASTModuleDirective {
ASTModuleUsesDirective(int id) {
super(id, DirectiveType.USES);