ASTPackageDeclaration extends AbstractJavaAnnotatableNode { public String getPackageNameImage() { return ((ASTName) getChild(this.getNumChildren() - 1)).getImage(); } @InternalApi @Deprecated  ASTPackageDeclaration(int id); @InternalApi @Deprecated  ASTPackageDeclaration(JavaParser p, int id); @Override Object jjtAccept(JavaParserVisitor visitor, Object data); String getPackageNameImage();  }
@Test public void testPackageName() { ASTCompilationUnit nodes = java.parse(PACKAGE_INFO_ANNOTATED); assertEquals("net.sourceforge.pmd.foobar", nodes.getPackageDeclaration().getPackageNameImage()); assertEquals("net.sourceforge.pmd.foobar", nodes.getPackageName()); }