com.icfolson.aem.library.models.annotations.InheritInject Maven / Gradle / Ivy
The newest version!
package com.icfolson.aem.library.models.annotations;
import org.apache.sling.models.annotations.Source;
import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy;
import org.apache.sling.models.spi.injectorspecific.InjectAnnotation;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({ METHOD, FIELD, PARAMETER })
@Retention(RUNTIME)
@InjectAnnotation
@Source(InheritInject.NAME)
public @interface InheritInject {
String NAME = "inherit";
/**
* if set to REQUIRED injection is mandatory, if set to OPTIONAL injection is optional, in case of DEFAULT the
* standard annotations ( {@link org.apache.sling.models.annotations.Optional}, {@link
* org.apache.sling.models.annotations.Required}) are used. If even those are not available the default injection
* strategy defined on the {@link org.apache.sling.models.annotations.Model} applies. Default value = DEFAULT.
*
* @return Injection strategy
*/
InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
}