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

javax.enterprise.inject.spi.Annotated Maven / Gradle / Ivy

There is a newer version: 3.0.0.Alpha1
Show newest version
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2010, Red Hat, Inc., and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * Licensed 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.Type;
import java.util.Set;

/**
 * 

Represents a Java program element that can be annotated.

* * @see java.lang.reflect.AnnotatedElement * * @author Gavin King * @author Pete Muir * @author Clint Popetz * */ public interface Annotated { /** *

Get the type of the annotated program element.

* * @return the type of the annotated program element */ public Type getBaseType(); /** *

Get all types to which the base type should be considered * assignable.

* * @return a set of all types to which the base type should be considered * assignable */ public Set getTypeClosure(); /** *

Get program element annotation of a certain annotation type.

* * @param the type of the annotation * @param annotationType the class of the annotation type * @return the program element annotation of the given annotation type, * or a null value */ public T getAnnotation(Class annotationType); /** *

Get all annotations of the program element.

* * @return all annotations of the program element, or an empty set if no * annotations are present */ public Set getAnnotations(); /** *

Determine if the program element has an annotation of a * certain annotation type.

* * @param annotationType the annotation type to check for * @return true if the program element has an annotation of the * given annotation type, or false otherwise */ public boolean isAnnotationPresent(Class annotationType); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy