Module org.eclipse.persistence.jpa
Class MetadataAnnotation
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotation
-
public class MetadataAnnotation extends Object
Metadata representation of an annotation.- Since:
- EclipseLink 1.2
- Author:
- James Sutherland
-
-
Constructor Summary
Constructors Constructor Description MetadataAnnotation()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String key, Object value)INTERNAL:MetadataAnnotationgetAttributeAnnotation(String name)INTERNAL: Return annotation attribute value.Object[]getAttributeArray(String name)INTERNAL: Return the attribute value, or an empty array if not set.BooleangetAttributeBoolean(String name, Boolean defaultValue)INTERNAL: Return the boolean attribute value, or the default value if not set.BooleangetAttributeBooleanDefaultFalse(String name)INTERNAL: Return the boolean attribute value, or FALSE if not set.BooleangetAttributeBooleanDefaultTrue(String name)INTERNAL: Return the boolean attribute value, or TRUE if not set.StringgetAttributeClass(String name, Class<?> defaultClass)INTERNAL: Return the Class attribute value, or the default provided.IntegergetAttributeInteger(String name)INTERNAL: Return Integer attribute value.Map<String,Object>getAttributes()INTERNAL:StringgetAttributeString(String name)INTERNAL: Return the attribute value, or null if not set.StringgetAttributeString(String name, String defaultValue)INTERNAL: Return the attribute value, or defaultValue if not set.StringgetName()INTERNAL:booleanhasAttribute(String name)INTERNAL: Return true if the attribute exists.booleanisMeta()INTERNAL:voidsetAttributes(Map<String,Object> attributes)INTERNAL:voidsetIsMeta(boolean isMeta)INTERNAL:voidsetName(String name)INTERNAL:StringtoString()INTERNAL:
-
-
-
Method Detail
-
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.
-
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
-
-