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

org.jboss.cdi.tck.tests.extensions.beanManager.CowBean Maven / Gradle / Ivy

There is a newer version: 3.0.3
Show newest version
package org.jboss.cdi.tck.tests.extensions.beanManager;

import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.context.spi.CreationalContext;
import jakarta.enterprise.inject.Default;
import jakarta.enterprise.inject.spi.Bean;
import jakarta.enterprise.inject.spi.InjectionPoint;
import jakarta.enterprise.inject.spi.PassivationCapable;

public class CowBean implements Bean, PassivationCapable, Serializable {
    private static final long serialVersionUID = 6249623250272328272L;
    public static final String PASSIVATION_ID = "Cow-6249623250272328272L";
    private final Set qualifiers = new HashSet(Arrays.asList(Default.Literal.INSTANCE));
    private final Set types = new HashSet(Arrays. asList(Cow.class));

    public Class getBeanClass() {
        return Cow.class;
    }

    public Set getInjectionPoints() {
        return Collections.emptySet();
    }

    public String getName() {
        return "cow";
    }

    public Set getQualifiers() {
        return qualifiers;
    }

    public Class getScope() {
        return Dependent.class;
    }

    public Set> getStereotypes() {
        return Collections.emptySet();
    }

    public Set getTypes() {
        return types;
    }

    public boolean isAlternative() {
        return false;
    }

    public boolean isNullable() {
        return false;
    }

    public Cow create(CreationalContext creationalContext) {
        return new Cow("Betsy");
    }

    public void destroy(Cow instance, CreationalContext creationalContext) {
    }

    public String getId() {
        return PASSIVATION_ID;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy