    001// Copyright 2011 The Apache Software Foundation
    002//
    003// Licensed under the Apache License, Version 2.0 (the "License");
    004// you may not use this file except in compliance with the License.
    005// You may obtain a copy of the License at
    006//
    007// http://www.apache.org/licenses/LICENSE-2.0
    008//
    009// Unless required by applicable law or agreed to in writing, software
    010// distributed under the License is distributed on an "AS IS" BASIS,
    011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    012// See the License for the specific language governing permissions and
    013// limitations under the License.
    014
    015package org.apache.tapestry5.ioc;
    016
    017/**
    018 * Introduced for Tapestry 5.3, contains new methods to provide access to annotations on the class,
    019 * and on methods of the class. In rare cases, the same annotation type will appear on the service interface
    020 * and on the class (or method implementation in the class); the implementation annotation always
    021 * has precedence over the interface annotation.
    022 *
    023 * @since 5.3
    024 */
    025public interface AnnotationAccess
    026{
    027    /**
    028     * Returns a provider for annotations on the service class and interface. This will reflect annotations defined by
    029     * the implementation class itself, plus annotations defined by the service interface (implementation class
    030     * annotations take precedence).
    031     */
    032    AnnotationProvider getClassAnnotationProvider();
    033
    034    /**
    035     * Returns a provider for annotations of a method of the class. This includes annotations on
    036     * the implementation method, plus annotations on the corresponding service interface method
    037     * (if such a method exists), with precedence on the implementation class method annotations.
    038     */
    039    AnnotationProvider getMethodAnnotationProvider(String methodName, Class... parameterTypes);
    040
    041}