javax.enterprise.inject.spi.InjectionPoint Maven / Gradle / Ivy
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package javax.enterprise.inject.spi;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Set;
/**
* An InjectionPoint object provides metadata information about an injection point.
* An instance of InjectionPoint may represent one of the following types:
*
* - an injected field
* - a parameter of a bean constructor
* - an initializer method
* - a producer method
* - a disposer method
* - an observer method
*
*
* @version $Rev$ $Date$
*/
public interface InjectionPoint
{
/**
* Returns required type of the injection point.
*
* @return type of the injection point
*/
Type getType();
/**
* Returns required qualifiers of the injection point.
*
* @return qualifiers at the injection point
*/
Set getQualifiers();
/**
* Returns the injection point owner bean.
*
* If there is no bean for the injection point,
* it returns null.
*
*
* @return injection point owner bean
*/
Bean> getBean();
/**
* Returns appered point for injection point. One of
*
* - {@link Field} object
* - {@link Constructor} parameter
* - {@link Method} producer method parameter
* - {@link Method} disposal method parameter
* - {@link Method} observer method parameter
*
*
* @return where the injection point is appeared
*/
Member getMember();
/**
* Returns annotated object representation of member.
*
* @return annotated
*/
Annotated getAnnotated();
/**
* Returns true if injection point is decorator delegate,
* false otherwise.
*
* @return true if injection point is decorator delegate
*/
boolean isDelegate();
/**
* Returns true if injection point is transient,
* false otherwise.
*
* @return true if injection point is transient
*/
boolean isTransient();
}