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

org.jboss.weld.bootstrap.ContextHolder Maven / Gradle / Ivy

There is a newer version: 6.0.0.Beta4
Show newest version
package org.jboss.weld.bootstrap;

import org.jboss.weld.literal.AnyLiteral;
import org.jboss.weld.literal.DefaultLiteral;

import javax.enterprise.context.spi.Context;
import java.lang.annotation.Annotation;
import java.util.Set;

import static org.jboss.weld.util.collections.Arrays2.asSet;

public class ContextHolder {

    private final T context;
    private final Class type;
    private final Set qualifiers;

    public ContextHolder(T context, Class type, Annotation qualifier) {
        super();
        this.context = context;
        this.type = type;
        this.qualifiers = asSet(DefaultLiteral.INSTANCE, AnyLiteral.INSTANCE, qualifier);
    }

    public T getContext() {
        return context;
    }

    public Class getType() {
        return type;
    }

    public Set getQualifiers() {
        return qualifiers;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy