src/share/classes/javax/lang/model/util/Types.java

changeset 1644
40adaf938847
parent 1521
71f35e4b93a5
child 1645
97f6839673d6
     1.1 --- a/src/share/classes/javax/lang/model/util/Types.java	Mon Mar 18 08:46:09 2013 -0700
     1.2 +++ b/src/share/classes/javax/lang/model/util/Types.java	Mon Mar 18 14:40:32 2013 -0700
     1.3 @@ -301,116 +301,4 @@
     1.4       *          for the given type
     1.5       */
     1.6      TypeMirror asMemberOf(DeclaredType containing, Element element);
     1.7 -
     1.8 -    /**
     1.9 -     * Returns the annotations targeting the type.
    1.10 -     *
    1.11 -     * @param type the targeted type
    1.12 -     * @return the type annotations targeting the type
    1.13 -     */
    1.14 -    List<? extends AnnotationMirror> typeAnnotationsOf(TypeMirror type);
    1.15 -
    1.16 -    /**
    1.17 -     * Returns the type's annotation for the specified type if
    1.18 -     * such an annotation is present, else {@code null}.  The
    1.19 -     * annotation has to be directly present on this
    1.20 -     * element.
    1.21 -     *
    1.22 -     * <p> The annotation returned by this method could contain an element
    1.23 -     * whose value is of type {@code Class}.
    1.24 -     * This value cannot be returned directly:  information necessary to
    1.25 -     * locate and load a class (such as the class loader to use) is
    1.26 -     * not available, and the class might not be loadable at all.
    1.27 -     * Attempting to read a {@code Class} object by invoking the relevant
    1.28 -     * method on the returned annotation
    1.29 -     * will result in a {@link MirroredTypeException},
    1.30 -     * from which the corresponding {@link TypeMirror} may be extracted.
    1.31 -     * Similarly, attempting to read a {@code Class[]}-valued element
    1.32 -     * will result in a {@link MirroredTypesException}.
    1.33 -     *
    1.34 -     * <blockquote>
    1.35 -     * <i>Note:</i> This method is unlike others in this and related
    1.36 -     * interfaces.  It operates on runtime reflective information &mdash;
    1.37 -     * representations of annotation types currently loaded into the
    1.38 -     * VM &mdash; rather than on the representations defined by and used
    1.39 -     * throughout these interfaces.  Consequently, calling methods on
    1.40 -     * the returned annotation object can throw many of the exceptions
    1.41 -     * that can be thrown when calling methods on an annotation object
    1.42 -     * returned by core reflection.  This method is intended for
    1.43 -     * callers that are written to operate on a known, fixed set of
    1.44 -     * annotation types.
    1.45 -     * </blockquote>
    1.46 -     *
    1.47 -     * @param <A>   the annotation type
    1.48 -     * @param type  the targeted type
    1.49 -     * @param annotationType  the {@code Class} object corresponding to
    1.50 -     *          the annotation type
    1.51 -     * @return the type's annotation for the specified annotation
    1.52 -     *         type if present on the type, else {@code null}
    1.53 -     *
    1.54 -     * @see Element#getAnnotationMirrors()
    1.55 -     * @see EnumConstantNotPresentException
    1.56 -     * @see AnnotationTypeMismatchException
    1.57 -     * @see IncompleteAnnotationException
    1.58 -     * @see MirroredTypeException
    1.59 -     * @see MirroredTypesException
    1.60 -     */
    1.61 -    <A extends Annotation> A typeAnnotationOf(TypeMirror type, Class<A> annotationType);
    1.62 -
    1.63 -    /**
    1.64 -     * Returns the annotations targeting the method receiver type.
    1.65 -     *
    1.66 -     * @param type the targeted type
    1.67 -     * @return the receiver type of the executable type
    1.68 -     */
    1.69 -    TypeMirror receiverTypeOf(ExecutableType type);
    1.70 -
    1.71 -    /**
    1.72 -     * Returns the type's annotation for the specified executable type
    1.73 -     * receiver if such an annotation is present, else {@code null}.  The
    1.74 -     * annotation has to be directly present on this
    1.75 -     * element.
    1.76 -     *
    1.77 -     * <p> The annotation returned by this method could contain an element
    1.78 -     * whose value is of type {@code Class}.
    1.79 -     * This value cannot be returned directly:  information necessary to
    1.80 -     * locate and load a class (such as the class loader to use) is
    1.81 -     * not available, and the class might not be loadable at all.
    1.82 -     * Attempting to read a {@code Class} object by invoking the relevant
    1.83 -     * method on the returned annotation
    1.84 -     * will result in a {@link MirroredTypeException},
    1.85 -     * from which the corresponding {@link TypeMirror} may be extracted.
    1.86 -     * Similarly, attempting to read a {@code Class[]}-valued element
    1.87 -     * will result in a {@link MirroredTypesException}.
    1.88 -     *
    1.89 -     * <blockquote>
    1.90 -     * <i>Note:</i> This method is unlike others in this and related
    1.91 -     * interfaces.  It operates on runtime reflective information &mdash;
    1.92 -     * representations of annotation types currently loaded into the
    1.93 -     * VM &mdash; rather than on the representations defined by and used
    1.94 -     * throughout these interfaces.  Consequently, calling methods on
    1.95 -     * the returned annotation object can throw many of the exceptions
    1.96 -     * that can be thrown when calling methods on an annotation object
    1.97 -     * returned by core reflection.  This method is intended for
    1.98 -     * callers that are written to operate on a known, fixed set of
    1.99 -     * annotation types.
   1.100 -     * </blockquote>
   1.101 -     *
   1.102 -     * @param <A>   the annotation type
   1.103 -     * @param type  the method type
   1.104 -     * @param annotationType  the {@code Class} object corresponding to
   1.105 -     *          the annotation type
   1.106 -     * @return the type's annotation for the specified annotation
   1.107 -     *         type if present on the type, else {@code null}
   1.108 -     *
   1.109 -     * @see Element#getAnnotationMirrors()
   1.110 -     * @see EnumConstantNotPresentException
   1.111 -     * @see AnnotationTypeMismatchException
   1.112 -     * @see IncompleteAnnotationException
   1.113 -     * @see MirroredTypeException
   1.114 -     * @see MirroredTypesException
   1.115 -     */
   1.116 -    // TODO: no longer needed?
   1.117 -    // <A extends Annotation> A receiverTypeAnnotationOf(ExecutableType type, Class<A> annotationType);
   1.118 -
   1.119  }

mercurial