org.jboss.cdi.tck.tests.extensions.beanManager.CowBean Maven / Gradle / Ivy
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 extends Annotation> 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;
}
}