DeclarationImpl.java revision 0
/*
* Copyright 2004-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/**
* Implementation of Declaration
*/
public abstract class DeclarationImpl implements Declaration {
protected static DeclarationFilter identityFilter =
new DeclarationFilter();
/**
* "sym" should be completed before this constructor is called.
*/
}
/**
* {@inheritDoc}
* <p> ParameterDeclarationImpl overrides this implementation.
*/
if (obj instanceof DeclarationImpl) {
} else {
return false;
}
}
/**
* {@inheritDoc}
* <p> ParameterDeclarationImpl overrides this implementation.
*/
public int hashCode() {
}
/**
* {@inheritDoc}
*/
public String getDocComment() {
// Our doc comment is contained in a map in our toplevel,
// indexed by our tree. Find our enter environment, which gives
// us our toplevel. It also gives us a tree that contains our
// tree: walk it to find our tree. This is painful.
return null;
}
/**
* {@inheritDoc}
*/
new ArrayList<AnnotationMirror>();
}
return res;
}
/**
* {@inheritDoc}
* Overridden by ClassDeclarationImpl to handle @Inherited.
*/
}
if (!annoType.isAnnotation()) {
throw new IllegalArgumentException(
"Not an annotation type: " + annoType);
}
annoType);
}
}
return null;
}
// Cache for modifiers.
/**
* {@inheritDoc}
*/
}
return modifiers;
}
/**
* {@inheritDoc}
* Overridden in some subclasses.
*/
public String getSimpleName() {
}
/**
* {@inheritDoc}
*/
public SourcePosition getPosition() {
// Find the toplevel. From there use a tree-walking utility
// that finds the tree for our symbol, and with it the position.
return null;
if (sourcefile == null)
return null;
}
/**
* Applies a visitor to this declaration.
*
* @param v the visitor operating on this declaration
*/
public void accept(DeclarationVisitor v) {
v.visitDeclaration(this);
}
/**
* Returns the symbols of type or package members (and constructors)
* that are not synthetic or otherwise unwanted.
* Caches the result if "cache" is true.
*/
return members;
}
}
}
}
/**
* Tests whether this is a symbol that should never be seen by clients,
* such as a synthetic class.
* Note that a class synthesized by the compiler may not be flagged as
* synthetic: see bugid 4959932.
*/
}
/**
* Returns this declaration's enter environment, or null if it
* has none.
*/
// Get enclosing class of sym, or sym itself if it is a class
// or package.
: (PackageSymbol) sym;
: null;
}
}