<s> package org . eclipse . jdt . internal . core ; import org . eclipse . jdt . core . * ; import org . eclipse . jdt . core . IPackageDeclaration ; public class PackageDeclaration extends SourceRefElement implements IPackageDeclaration { String name ; protected PackageDeclaration ( CompilationUnit parent , String name ) { super ( parent ) ; this . name = name ; } public boolean equals ( Object o ) { if ( ! ( o instanceof PackageDeclaration ) ) return false ; return super . equals ( o ) ; } public String getElementName ( ) { return this . name ; } public int getElementType ( ) { return PACKAGE_DECLARATION ; } protected char getHandleMementoDelimiter ( ) { return JavaElement . JEM_PACKAGEDECLARATION ; } public IJavaElement getPrimaryElement ( boolean checkOwner ) { CompilationUnit cu = ( CompilationUnit ) getAncestor ( COMPILATION_UNIT ) ; if ( checkOwner && cu . isPrimary ( ) ) return this ; return cu . getPackageDeclaration ( this . name ) ; } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { buffer . append ( tabString ( tab ) ) ; buffer . append ( "package " ) ; toStringName ( buffer ) ; if ( info == null ) { buffer . append ( " (not open)" ) ; } } } </s>