Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.metadata.accessors.objects

public Class MetadataAnnotation

extends Object
Class Inheritance
Imports
java.util.HashMap, .Map

Metadata representation of an annotation.
Author
James Sutherland
Since
EclipseLink 1.2

Field Summary

Modifier and TypeField and Description
protected boolean
isMeta

Metadata annotation flag

protected Map<String, Object>
m_attributes

Map of attribute names and values.

protected String
m_name

The name of the annotation.

Constructor Summary

AccessConstructor and Description
public
MetadataAnnotation()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
addAttribute(String key, Object value)

INTERNAL:

private Object
getAttribute(String name)

INTERNAL: Return the attribute value, or null if not set.

public MetadataAnnotation
getAttributeAnnotation(String name)

INTERNAL: Return annotation attribute value.

public Object[]
getAttributeArray(String name)

INTERNAL: Return the attribute value, or an empty array if not set.

public Boolean
getAttributeBoolean(String name, Boolean defaultValue)

INTERNAL: Return the boolean attribute value, or the default value if not set.

public Boolean
getAttributeBooleanDefaultFalse(String name)

INTERNAL: Return the boolean attribute value, or FALSE if not set.

public Boolean
getAttributeBooleanDefaultTrue(String name)

INTERNAL: Return the boolean attribute value, or TRUE if not set.

public String
getAttributeClass(String name, Class<?> defaultClass)

INTERNAL: Return the Class attribute value, or the default provided.

public Integer
getAttributeInteger(String name)

INTERNAL: Return Integer attribute value.

public Map<String, Object>
getAttributes()

INTERNAL:

public String
getAttributeString(String name)

INTERNAL: Return the attribute value, or null if not set.

public String
getAttributeString(String name, String defaultValue)

INTERNAL: Return the attribute value, or defaultValue if not set.

public String
getName()

INTERNAL:

public boolean
hasAttribute(String name)

INTERNAL: Return true if the attribute exists.

public boolean

Returns:

true if this annotation is a meta-annotation
isMeta
()

INTERNAL:

public void
setAttributes(Map<String, Object> attributes)

INTERNAL:

public void
setIsMeta(boolean isMeta)

INTERNAL:

public void
setName(String name)

INTERNAL:

public String
toString()

Overrides java.lang.Object.toString.

INTERNAL:
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

isMetaback to summary
protected boolean isMeta

Metadata annotation flag

m_attributesback to summary
protected Map<String, Object> m_attributes

Map of attribute names and values.

m_nameback to summary
protected String m_name

The name of the annotation.

Constructor Detail

MetadataAnnotationback to summary
public MetadataAnnotation()

Default constructor.

Method Detail

addAttributeback to summary
public void addAttribute(String key, Object value)

INTERNAL:

getAttributeback to summary
private Object getAttribute(String name)

INTERNAL: Return the attribute value, or null if not set. This should remain a private method and callers should use one of the more specific getAttribute calls. (and build one if necessary)

See Also
getAttributeAnnotation(String), getAttributeArray(String), getAttributeInteger(String), getAttributeString(String), getAttributeBoolean(String, Boolean), getAttributeBooleanDefaultFalse(String), getAttributeBooleanDefaultTrue(String)
getAttributeAnnotationback to summary
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.

getAttributeArrayback to summary
public Object[] getAttributeArray(String name)

INTERNAL: Return the attribute value, or an empty array if not set. Callers will have the cast the type.

getAttributeBooleanback to summary
public Boolean getAttributeBoolean(String name, Boolean defaultValue)

INTERNAL: Return the boolean attribute value, or the default value if not set.

getAttributeBooleanDefaultFalseback to summary
public Boolean getAttributeBooleanDefaultFalse(String name)

INTERNAL: Return the boolean attribute value, or FALSE if not set.

getAttributeBooleanDefaultTrueback to summary
public Boolean getAttributeBooleanDefaultTrue(String name)

INTERNAL: Return the boolean attribute value, or TRUE if not set.

getAttributeClassback to summary
public String getAttributeClass(String name, Class<?> defaultClass)

INTERNAL: Return the Class attribute value, or the default provided.

getAttributeIntegerback to summary
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.

getAttributesback to summary
public Map<String, Object> getAttributes()

INTERNAL:

getAttributeStringback to summary
public String getAttributeString(String name)

INTERNAL: Return the attribute value, or null if not set.

getAttributeStringback to summary
public String getAttributeString(String name, String defaultValue)

INTERNAL: Return the attribute value, or defaultValue if not set.

getNameback to summary
public String getName()

INTERNAL:

hasAttributeback to summary
public boolean hasAttribute(String name)

INTERNAL: Return true if the attribute exists.

isMetaback to summary
public boolean isMeta()

INTERNAL:

Returns:boolean

true if this annotation is a meta-annotation

setAttributesback to summary
public void setAttributes(Map<String, Object> attributes)

INTERNAL:

setIsMetaback to summary
public void setIsMeta(boolean isMeta)

INTERNAL:

setNameback to summary
public void setName(String name)

INTERNAL:

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

INTERNAL:

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

Annotations
@Override