Class MetadataAnnotation


  • public class MetadataAnnotation
    extends Object
    Metadata representation of an annotation.
    Since:
    EclipseLink 1.2
    Author:
    James Sutherland
    • Field Detail

      • m_name

        protected String m_name
        The name of the annotation.
      • isMeta

        protected boolean isMeta
        Metadata annotation flag
      • m_attributes

        protected Map<String,​Object> m_attributes
        Map of attribute names and values.
    • Constructor Detail

      • MetadataAnnotation

        public MetadataAnnotation()
        Default constructor.
    • Method Detail

      • addAttribute

        public void addAttribute​(String key,
                                 Object value)
        INTERNAL:
      • getAttributeAnnotation

        public MetadataAnnotation getAttributeAnnotation​(String name)
        INTERNAL: Return annotation attribute value. You should call this method only if you know the object returned will be a MetadataAnnotation.
      • getAttributeArray

        public Object[] getAttributeArray​(String name)
        INTERNAL: Return the attribute value, or an empty array if not set. Callers will have the cast the type.
      • getAttributeBoolean

        public Boolean getAttributeBoolean​(String name,
                                           Boolean defaultValue)
        INTERNAL: Return the boolean attribute value, or the default value if not set.
      • getAttributeBooleanDefaultFalse

        public Boolean getAttributeBooleanDefaultFalse​(String name)
        INTERNAL: Return the boolean attribute value, or FALSE if not set.
      • getAttributeBooleanDefaultTrue

        public Boolean getAttributeBooleanDefaultTrue​(String name)
        INTERNAL: Return the boolean attribute value, or TRUE if not set.
      • getAttributeClass

        public String getAttributeClass​(String name,
                                        Class<?> defaultClass)
        INTERNAL: Return the Class attribute value, or the default provided.
      • getAttributeInteger

        public Integer getAttributeInteger​(String name)
        INTERNAL: Return Integer attribute value. You should call this method only if you know the object returned will be an Integer.
      • getAttributeString

        public String getAttributeString​(String name)
        INTERNAL: Return the attribute value, or null if not set.
      • getAttributeString

        public String getAttributeString​(String name,
                                         String defaultValue)
        INTERNAL: Return the attribute value, or defaultValue if not set.
      • getName

        public String getName()
        INTERNAL:
      • hasAttribute

        public boolean hasAttribute​(String name)
        INTERNAL: Return true if the attribute exists.
      • setAttributes

        public void setAttributes​(Map<String,​Object> attributes)
        INTERNAL:
      • setName

        public void setName​(String name)
        INTERNAL:
      • setIsMeta

        public void setIsMeta​(boolean isMeta)
        INTERNAL:
      • isMeta

        public boolean isMeta()
        INTERNAL:
        Returns:
        true if this annotation is a meta-annotation