Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.bean.interceptor;
 
 

Author(s):
Marius Bogoevici
public class CustomInterceptorMetadata<T> implements InterceptorClassMetadata<T> {
    @SuppressWarnings("unchecked")
    public static <T> CustomInterceptorMetadata<T> of(Interceptor<T> interceptor) {
        return new CustomInterceptorMetadata<T>(new CdiInterceptorFactory<T>(interceptor), (Class<T>) interceptor.getBeanClass());
    }
    private final CdiInterceptorFactory<T> factory;
    private final Class<T> javaClass;
    private CustomInterceptorMetadata(CdiInterceptorFactory<T> factoryClass<T> javaClass) {
        this. = factory;
        this. = javaClass;
    }
    @Override
       return ;
    }
    @Override
    public boolean isEligible(InterceptionType interceptionType) {
        return .getInterceptor().intercepts(javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name()));
    }
    @Override
    @SuppressWarnings("unchecked")
    public InterceptorInvocation getInterceptorInvocation(Object interceptorInstanceInterceptionType interceptionType) {
        return new CustomInterceptorInvocation<T>(.getInterceptor(), (T) interceptorInstance, javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name()));
    }
    @Override
    public String toString() {
        return "CustomInterceptorMetadata [" + getJavaClass().getName() + "]";
    }
    @Override
    public Class<T> getJavaClass() {
        return ;
    }
New to GrepCode? Check out our FAQ X