org.codehaus.enunciate.contract.jaxb
Class Attribute

java.lang.Object
  extended by net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
      extended by net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration
          extended by org.codehaus.enunciate.contract.jaxb.Accessor
              extended by org.codehaus.enunciate.contract.jaxb.Attribute
All Implemented Interfaces:
com.sun.mirror.declaration.Declaration, com.sun.mirror.declaration.MemberDeclaration, HasFacets, Adaptable

public class Attribute
extends Accessor

An accessor that is marshalled in xml to an xml attribute.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
delegate, javaDoc
 
Constructor Summary
Attribute(com.sun.mirror.declaration.MemberDeclaration delegate, TypeDefinition typedef)
           
 
Method Summary
 javax.xml.bind.annotation.XmlNsForm getForm()
          The form of this attribute.
 java.lang.String getJsonMemberName()
          Get the name for the JSON member to which this element will be serialized.
 java.lang.String getName()
          The name of the accessor.
 java.lang.String getNamespace()
          The namespace of the accessor.
 javax.xml.namespace.QName getRef()
          An attribute is a ref if its namespace differs from that of its type definition (JAXB spec 8.9.7.2).
 boolean isAttribute()
          Whether this accessor is an attribute.
 boolean isFormQualified()
          Whether the form of this attribute is qualified.
 boolean isRequired()
          Whether the attribute is required.
 
Methods inherited from class org.codehaus.enunciate.contract.jaxb.Accessor
getAccessorForXmlID, getAccessorType, getAdapterType, getBareAccessorType, getBaseType, getClientSimpleName, getCollectionItemType, getFacets, getMimeType, getQNameEnumRef, getReferencedFrom, getResolvedAccessorType, getSeeAlsos, getTypeDefinition, isAdapted, isBinaryData, isCollectionType, isElementRef, isMTOMAttachment, isQNameType, isReferencesQNameEnum, isSwaRef, isValue, isXmlID, isXmlIDREF, isXmlList
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration
accept, getDeclaringType
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
constructJavaDoc, equals, getAnnotation, getAnnotationMirrors, getAnnotations, getDelegate, getDocComment, getDocValue, getJavaDoc, getModifiers, getPosition, getSimpleName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.mirror.declaration.Declaration
equals, getAnnotation, getAnnotationMirrors, getDocComment, getModifiers, getPosition, getSimpleName
 

Constructor Detail

Attribute

public Attribute(com.sun.mirror.declaration.MemberDeclaration delegate,
                 TypeDefinition typedef)
Method Detail

getName

public java.lang.String getName()
Description copied from class: Accessor
The name of the accessor.

Specified by:
getName in class Accessor
Returns:
The name of the accessor.

getNamespace

public java.lang.String getNamespace()
Description copied from class: Accessor
The namespace of the accessor.

Specified by:
getNamespace in class Accessor
Returns:
The namespace of the accessor.

getForm

public javax.xml.bind.annotation.XmlNsForm getForm()
The form of this attribute.

Returns:
The form of this attribute.

isFormQualified

public boolean isFormQualified()
Whether the form of this attribute is qualified.

Returns:
Whether the form of this attribute is qualified.

getRef

public javax.xml.namespace.QName getRef()
An attribute is a ref if its namespace differs from that of its type definition (JAXB spec 8.9.7.2).

Overrides:
getRef in class Accessor
Returns:
The ref or null.

isRequired

public boolean isRequired()
Whether the attribute is required.

Returns:
Whether the attribute is required.

isAttribute

public boolean isAttribute()
Description copied from class: Accessor
Whether this accessor is an attribute.

Overrides:
isAttribute in class Accessor
Returns:
true

getJsonMemberName

public java.lang.String getJsonMemberName()
Description copied from class: Accessor
Get the name for the JSON member to which this element will be serialized.

Specified by:
getJsonMemberName in class Accessor
Returns:
The JSON member name.