
org.jboss.weld.annotated.slim.backed.BackedAnnotated Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weld-se-shaded Show documentation
Show all versions of weld-se-shaded Show documentation
This jar bundles all the bits of Weld and CDI required for Java SE.
package org.jboss.weld.annotated.slim.backed;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Type;
import java.util.Set;
import org.jboss.weld.annotated.slim.BaseAnnotated;
import org.jboss.weld.resources.ReflectionCache;
import org.jboss.weld.resources.SharedObjectCache;
import org.jboss.weld.util.LazyValueHolder;
public abstract class BackedAnnotated extends BaseAnnotated {
private final LazyValueHolder> typeClosure;
public BackedAnnotated(Type baseType, SharedObjectCache sharedObjectCache) {
super(baseType);
this.typeClosure = initTypeClosure(baseType, sharedObjectCache);
}
protected LazyValueHolder> initTypeClosure(Type baseType, SharedObjectCache cache) {
return cache.getTypeClosureHolder(baseType);
}
public Set getTypeClosure() {
return typeClosure.get();
}
protected abstract AnnotatedElement getAnnotatedElement();
protected abstract ReflectionCache getReflectionCache();
@Override
public Set getAnnotations() {
return getReflectionCache().getAnnotations(getAnnotatedElement());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy