Methods Summary |
---|
public void | accept(com.sun.mirror.util.DeclarationVisitor v)Applies a visitor to this declaration.
|
public boolean | equals(java.lang.Object obj)Tests whether an object represents the same declaration as this.
|
public A | getAnnotation(java.lang.Class annotationType)Returns the annotation of this declaration having the specified
type. The annotation may be either inherited or directly
present on this declaration.
The annotation returned by this method could contain an element
whose value is of type Class.
This value cannot be returned directly: information necessary to
locate and load a class (such as the class loader to use) is
not available, and the class might not be loadable at all.
Attempting to read a Class object by invoking the relevant
method on the returned annotation
will result in a {@link MirroredTypeException},
from which the corresponding {@link TypeMirror} may be extracted.
Similarly, attempting to read a Class[]-valued element
will result in a {@link MirroredTypesException}.
Note: This method is unlike
others in this and related interfaces. It operates on run-time
reflective information -- representations of annotation types
currently loaded into the VM -- rather than on the mirrored
representations defined by and used throughout these
interfaces. It is intended for callers that are written to
operate on a known, fixed set of annotation types.
|
public java.util.Collection | getAnnotationMirrors()Returns the annotations that are directly present on this declaration.
|
public java.lang.String | getDocComment()Returns the text of the documentation ("javadoc") comment of
this declaration.
|
public java.util.Collection | getModifiers()Returns the modifiers of this declaration, excluding annotations.
Implicit modifiers, such as the public and static
modifiers of interface members, are included.
|
public com.sun.mirror.util.SourcePosition | getPosition()Returns the source position of the beginning of this declaration.
Returns null if the position is unknown or not applicable.
This source position is intended for use in providing
diagnostics, and indicates only approximately where a declaration
begins.
|
public java.lang.String | getSimpleName()Returns the simple (unqualified) name of this declaration.
The name of a generic type does not include any reference
to its formal type parameters.
For example, the simple name of the interface declaration
{@code java.util.Set} is "Set".
If this declaration represents the empty package, an empty
string is returned.
If it represents a constructor, the simple name of its
declaring class is returned.
|