Package org.zkoss.zk.ui.metainfo
Class AnnotationMap
java.lang.Object
org.zkoss.zk.ui.metainfo.AnnotationMap
- All Implemented Interfaces:
Serializable,Cloneable
- Author:
- tomyeh
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAll(AnnotationMap src) Adds all annotations of the specified map to this map.voidaddAnnotation(String propName, String annotName, Map<String, String[]> annotAttrs, org.zkoss.util.resource.Location loc) Adds an annotation.clone()Clones this annotation map.Returns a read-only list of the name (String) of properties that are associated at least one annotation (never null).getAnnotatedPropertiesBy(String annotName) Returns a read-only list of the names (String) of the properties that are associated with the specified annotation (never null).getAnnotation(String propName, String annotName) Returns the annotation associated with the specified property, or null if not available.getAnnotations(String propName) Returns a read-only collection of all annotations associated with the the specified property.getAnnotations(String propName, String annotName) Returns the annotations associated with the specified property.booleanisEmpty()Returns whether no annotation at all.toString()
-
Constructor Details
-
AnnotationMap
public AnnotationMap()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns whether no annotation at all. -
getAnnotation
Returns the annotation associated with the specified property, or null if not available.- Parameters:
annotName- the annotation namepropName- the property name, e.g., "value". If null, this method returns the annotation(s) associated with the component (rather than a particular property).
-
getAnnotations
Returns the annotations associated with the specified property. It never returns null.- Parameters:
annotName- the annotation namepropName- the property name, e.g., "value". If null, this method returns the annotation(s) associated with the component (rather than a particular property).- Since:
- 6.0.0
-
getAnnotations
Returns a read-only collection of all annotations associated with the the specified property.- Parameters:
propName- the property name, e.g., "value". If null, this method returns the annotation(s) associated with the component (rather than a particular property).
-
getAnnotatedPropertiesBy
Returns a read-only list of the names (String) of the properties that are associated with the specified annotation (never null). -
getAnnotatedProperties
Returns a read-only list of the name (String) of properties that are associated at least one annotation (never null). -
addAll
Adds all annotations of the specified map to this map. -
addAnnotation
public void addAnnotation(String propName, String annotName, Map<String, String[]> annotAttrs, org.zkoss.util.resource.Location loc) Adds an annotation.- Parameters:
propName- the property name. If null, this method returns the annotation(s) associated with the component (rather than a particular property).- Since:
- 6.0.0
-
clone
Clones this annotation map. -
toString
-