Package org.jboss.weld.interceptor.proxy

Examples of org.jboss.weld.interceptor.proxy.InterceptorInvocation


    private static List<InterceptorMethodInvocation> buildInterceptorMethodInvocations(List<InterceptorClassMetadata<?>> interceptorMetadata,
            InterceptionContext ctx, InterceptionType interceptionType) {
        List<InterceptorMethodInvocation> interceptorInvocations = new ArrayList<InterceptorMethodInvocation>(interceptorMetadata.size());
        for (InterceptorClassMetadata<?> metadata : interceptorMetadata) {
            Object interceptorInstance = ctx.getInterceptorInstance(metadata);
            InterceptorInvocation invocation = metadata.getInterceptorInvocation(interceptorInstance, interceptionType);
            interceptorInvocations.addAll(invocation.getInterceptorMethodInvocations());
        }
        return interceptorInvocations;
    }
View Full Code Here


    }

    @Override
    public Object intercept(InterceptionType type, T instance, final InvocationContext ctx) {
        final org.jboss.weld.interceptor.spi.model.InterceptionType interceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(type.name());
        final InterceptorInvocation invocation = interceptorMetadata.getInterceptorInvocation(instance, interceptionType);

        try {
            if (ctx instanceof InterceptorInvocationContext || invocation.getInterceptorMethodInvocations().size() < 2) {
                return new SimpleInterceptionChain(invocation).invokeNextInterceptor(ctx);
            } else {
                /*
                 * Calling Interceptor.intercept() may result in multiple interceptor method invocations (provided the interceptor class
                 * interceptor methods on superclasses). This requires cooperation with InvocationContext.
View Full Code Here

TOP

Related Classes of org.jboss.weld.interceptor.proxy.InterceptorInvocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.