public class ELBinder extends Object
ELInterceptor on a given annotation.
The evaluation of the EL provided by the annotation value will be evaluated regarding the
ELBinder.ExecutionPolicy, ie. before the method is proceed, after, or both.
public class MyModule extends AbstractModule {
@Override
protected void configure() {
// the EL will be evaluated before the method proceed
new ELBinder(this.binder())
.bindELAnnotation(MyELAnnotation.class, ELBinder.ExecutionPolicy.BEFORE);
}
}
By default, if no policy is given the EL will be evaluated after the method proceed.
| Modifier and Type | Class and Description |
|---|---|
static class |
ELBinder.ExecutionPolicy
ExecutionPolicy define when an EL will be executed.
|
| Constructor and Description |
|---|
ELBinder(com.google.inject.Binder binder)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ELBinder |
bindELAnnotation(Class<? extends Annotation> annotationClass)
Bind an ELInterceptor to the given annotation with the default
ELBinder.ExecutionPolicy AFTER. |
ELBinder |
bindELAnnotation(Class<? extends Annotation> annotationClass,
ELBinder.ExecutionPolicy policy)
Bind an ELInterceptor to the given annotation with the given
ELBinder.ExecutionPolicy. |
public ELBinder(com.google.inject.Binder binder)
binder - the binder of the current modulepublic ELBinder bindELAnnotation(Class<? extends Annotation> annotationClass)
ELBinder.ExecutionPolicy AFTER.annotationClass - EL annotation to interceptpublic ELBinder bindELAnnotation(Class<? extends Annotation> annotationClass, ELBinder.ExecutionPolicy policy)
ELBinder.ExecutionPolicy.annotationClass - EL annotation to interceptpolicy - determine when the EL is evaluatedCopyright © 2013-2015–2015. All rights reserved.