org.jboss.weld.injection.ForwardingInjectionPoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weld-servlet-shaded Show documentation
Show all versions of weld-servlet-shaded Show documentation
This jar bundles all the bits of Weld and CDI required for running in a Servlet container.
package org.jboss.weld.injection;
import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.InjectionPoint;
import org.jboss.weld.util.reflection.Reflections;
import java.lang.annotation.Annotation;
import java.lang.reflect.Member;
import java.lang.reflect.Type;
import java.util.Set;
public abstract class ForwardingInjectionPoint implements InjectionPoint {
protected abstract InjectionPoint delegate();
public Annotated getAnnotated() {
return delegate().getAnnotated();
}
public Type getType() {
return delegate().getType();
}
public Set getQualifiers() {
return delegate().getQualifiers();
}
public Bean> getBean() {
return delegate().getBean();
}
public Member getMember() {
return delegate().getMember();
}
public boolean isDelegate() {
return delegate().isDelegate();
}
public boolean isTransient() {
return delegate().isTransient();
}
@Override
public boolean equals(Object obj) {
if (obj instanceof ForwardingInjectionPoint) {
return delegate().equals(Reflections. cast(obj).delegate());
}
return delegate().equals(obj);
}
@Override
public int hashCode() {
return delegate().hashCode();
}
@Override
public String toString() {
return delegate().toString();
}
}