org.zkoss.zk.ui.metainfo
Interface Annotation

All Superinterfaces:
java.io.Serializable

public interface Annotation
extends java.io.Serializable

The common interface extended by all annotation types. An annotation consists of a name (getName()) and a map of attributes getAttribute(java.lang.String).

To get the annotation associated with a component, use ComponentCtrl.getAnnotation(String). To get the annotation associated with a component's property, use ComponentCtrl.getAnnotation(String, String)

Author:
tomyeh
See Also:
ComponentCtrl.getAnnotation(String), ComponentCtrl.getAnnotation(String, String), ComponentCtrl.getAnnotations(), ComponentCtrl.getAnnotations(String)

Method Summary
 java.lang.String getAttribute(java.lang.String name)
          Returns the value of the given attribute, or null if not found.
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Returns the map of attributes(never null).
 java.lang.String[] getAttributeValues(java.lang.String name)
          Returns all values of the given attribute, or null if not found.
 java.lang.String getName()
          Returns the name of this annotation.
 

Method Detail

getName

java.lang.String getName()
Returns the name of this annotation.

For each declaration, there is at most one annotation with the same name.


getAttributes

java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns the map of attributes(never null). The key is a String instance, while the value is either an instance of String, or an array of String instances (String[]).

The returned map is read-only.


getAttribute

java.lang.String getAttribute(java.lang.String name)
Returns the value of the given attribute, or null if not found. If the value is an array of String instances, the first String instance is returned.


getAttributeValues

java.lang.String[] getAttributeValues(java.lang.String name)
Returns all values of the given attribute, or null if not found. If the value is a single instance of String, a single-element array is returned.

Since:
6.0.0


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo