@Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface ImplementsLocationStrategy
Enables to introduce new annotations of FindBy type with its own location strategy.
E.g.: framework specific location strategies, extended grammars for well-known strategies, etc.
Usage:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@ImplementsLocationStrategy(by = XYZLocationStrategy.class)
public @interface FindByXYZ {
String value();
}
public static class XYZLocationStrategy implementsLocationStrategy{ publicByfromAnnotation(Annotationannotation) { return ...; } }
LocationStrategy| Modifier and Type | Required Element and Description |
|---|---|
Class<? extends LocationStrategy> |
value |
public abstract Class<? extends LocationStrategy> value
Copyright © 2014 JBoss by Red Hat. All rights reserved.