View Javadoc

1   /*
2    * $Id: AnnotatedObject.java 23054 2011-10-02 05:31:18Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.api;
12  
13  import java.util.Map;
14  
15  import javax.xml.namespace.QName;
16  
17  public interface AnnotatedObject
18  {
19      public static final String PROPERTY_NAME = "annotations";
20  
21      /**
22       * Gets the value of specified annotation.
23       * 
24       * @return the value of specified annotation
25       */
26      Object getAnnotation(QName name);
27  
28      /**
29       * Gets all annotations.
30       *
31       * @return all annotation
32       */
33      Map<QName, Object> getAnnotations();
34  
35      /**
36       * Sets annotations to the object.
37       */
38      void setAnnotations(Map<QName, Object> annotations);
39  }