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

org.jboss.weld.injection.ForwardingInjectionPoint Maven / Gradle / Ivy

Go to download

This jar bundles all the bits of Weld and CDI required for running in a Servlet container.

There is a newer version: 6.0.0.Beta4
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy