001// Licensed under the Apache License, Version 2.0 (the "License");
002// you may not use this file except in compliance with the License.
003// You may obtain a copy of the License at
004//
005//     http://www.apache.org/licenses/LICENSE-2.0
006//
007// Unless required by applicable law or agreed to in writing, software
008// distributed under the License is distributed on an "AS IS" BASIS,
009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010// See the License for the specific language governing permissions and
011// limitations under the License.
012
013package org.apache.tapestry5.ioc.annotations;
014
015import java.lang.annotation.Documented;
016import java.lang.annotation.Retention;
017import java.lang.annotation.Target;
018
019import static java.lang.annotation.ElementType.METHOD;
020import static java.lang.annotation.ElementType.TYPE;
021import static java.lang.annotation.RetentionPolicy.RUNTIME;
022
023/**
024 * Marker annotation placed on a service builder method to indicate that the service should be eagerly loaded: realized
025 * as if a service method had been invoked. Service realization invokes the service builder method and applys any
026 * decorators to the service.
027 *
028 * This annotation may also be placed directly on a service implementation class, when using autobuilding via the {@link
029 * org.apache.tapestry5.ioc.ServiceBinder}.
030 *
031 * @see org.apache.tapestry5.ioc.ServiceBindingOptions#eagerLoad()
032 */
033@Target(
034        {TYPE, METHOD})
035@Retention(RUNTIME)
036@Documented
037@UseWith(AnnotationUseContext.SERVICE)
038public @interface EagerLoad
039{
040
041}