All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.arc.runtime.InterceptorBindings Maven / Gradle / Ivy

There is a newer version: 3.17.0.CR1
Show newest version
package io.quarkus.arc.runtime;

import java.lang.annotation.Annotation;
import java.util.Set;

import jakarta.interceptor.InvocationContext;

import io.quarkus.arc.AbstractAnnotationLiteral;
import io.quarkus.arc.ArcInvocationContext;

/**
 *
 * @see ArcInvocationContext#getInterceptorBindings()
 */
public final class InterceptorBindings {

    @SuppressWarnings("unchecked")
    public static Set getInterceptorBindings(InvocationContext invocationContext) {
        return (Set) invocationContext.getContextData().get(ArcInvocationContext.KEY_INTERCEPTOR_BINDINGS);
    }

    /**
     * This method is just a convenience for getting a hold of {@link AbstractAnnotationLiteral}.
     * See the Javadoc of the class for an explanation of the reasons it might be used {@link Annotation}.
     */
    @SuppressWarnings("unchecked")
    public static Set getInterceptorBindingLiterals(InvocationContext invocationContext) {
        return (Set) invocationContext.getContextData()
                .get(ArcInvocationContext.KEY_INTERCEPTOR_BINDINGS);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy