1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / IAnnotatable.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.core;
12
13 /**
14  * Common protocol for Java elements that can be annotated.
15  * <p>
16  * This interface is not intended to be implemented by clients.
17  * </p>
18  * 
19  * @since 3.4
20  */
21 public interface IAnnotatable {
22
23         /**
24          * Returns the annotation with the given name declared on this element.
25          * This is a handle-only method. The annotation may or may not exist.
26          * 
27          * @param name the given simple name
28          * @return the annotation with the given name declared on this element
29          */
30         IAnnotation getAnnotation(String name);
31         
32         /**
33          * Returns the annotations for this element.
34          * Returns an empty array if this method has no annotations.
35          *
36          * @exception JavaModelException if this element does not exist or if an
37          *      exception occurs while accessing its corresponding resource.
38          * @return the annotations of this element,
39          *              in the order declared in the source, or an empty array if none
40          * @since 3.4
41          */
42         IAnnotation[] getAnnotations() throws JavaModelException;
43 }