@Override public boolean visit( PackageDeclaration node ) { classPkg.set( node.getName().toString() ); return true; }
@Override public boolean visit(final PackageDeclaration node) { currentPackage = node.getName().getFullyQualifiedName(); return false; }
@Override public boolean visit(PackageDeclaration node) { LOG.finer("Found package: " + node.getName().toString()); return super.visit(node); }
@Override public void endVisit(PackageDeclaration node) { if (skipNode(node)) { return; } assignFlowInfo(node, node.getName()); }
@Override public String getPackage() { PackageDeclaration pkg = unit.getPackage(); if (pkg != null) { return pkg.getName().getFullyQualifiedName(); } return null; }
@Override public void endVisit(PackageDeclaration node) { if (skipNode(node)) return; assignFlowInfo(node, node.getName()); }
public String getName() { if (name == UNITIALIZED_STRING) { name = ASTFacadeHelper.toString(getASTNode().getName()); } return name; }
@Override public boolean visit(PackageDeclaration node) { Name name = node.getName(); fPackage = Factory.packageDescriptor(name.getFullyQualifiedName()); return false; }
@Override public void endVisit(PackageDeclaration node) { if (skipNode(node)) return; assignFlowInfo(node, node.getName()); }
public static String getPackageName(final Path path) { final CompilationUnit unit = JavaSourceUtils.getCompilationUnit(path); final PackageDeclaration myPackage = unit.getPackage(); if (myPackage != null) { final Name name = myPackage.getName(); if (name != null) { return name.getFullyQualifiedName(); } } return ""; }
@Override public boolean visit(final CompilationUnit node) { if (node.getPackage() != null) { currentPackageName = node.getPackage().getName() .getFullyQualifiedName(); } else { currentPackageName = ""; } return super.visit(node); }
@Override int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.annotations == null ? 0 : this.annotations.listSize()) + (this.packageName == null ? 0 : getName().treeSize()); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.annotations == null ? 0 : this.annotations.listSize()) + (this.packageName == null ? 0 : getName().treeSize()); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.annotations == null ? 0 : this.annotations.listSize()) + (this.packageName == null ? 0 : getName().treeSize()); } }
@Override void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.annotations); } acceptChild(visitor, getName()); } visitor.endVisit(this); }
public boolean visit(PackageDeclaration node) { _compilationUnit.setPackagePosition(node.getStartPosition()); String namespace = node.getName().toString(); _compilationUnit.namespace(mappedNamespace(namespace)); processDisableTags(node, _compilationUnit); return false; }
void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { if (this.ast.apiLevel >= AST.JLS3) { acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.annotations); } acceptChild(visitor, getName()); } visitor.endVisit(this); }
void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.annotations); } acceptChild(visitor, getName()); } visitor.endVisit(this); }
ASTNode clone0(AST target) { PackageDeclaration result = new PackageDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.annotations().addAll(ASTNode.copySubtrees(target, annotations())); } result.setName((Name) getName().clone(target)); return result; }
ASTNode clone0(AST target) { PackageDeclaration result = new PackageDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.annotations().addAll(ASTNode.copySubtrees(target, annotations())); } result.setName((Name) getName().clone(target)); return result; }