org.codehaus.enunciate.contract.jaxb
Class Element

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.Element
All Implemented Interfaces:
com.sun.mirror.declaration.Declaration, com.sun.mirror.declaration.MemberDeclaration, Adaptable
Direct Known Subclasses:
ElementRef

public class Element
extends Accessor

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

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
delegate, javaDoc
 
Constructor Summary
  Element(com.sun.mirror.declaration.MemberDeclaration delegate, TypeDefinition typedef)
           
protected Element(com.sun.mirror.declaration.MemberDeclaration delegate, TypeDefinition typedef, javax.xml.bind.annotation.XmlElement xmlElement)
          Construct an element accessor with a specific element annotation.
 
Method Summary
 com.sun.mirror.type.TypeMirror getAccessorType()
          The type of an element accessor can be specified by an annotation.
protected  com.sun.mirror.type.TypeMirror getAccessorType(java.lang.Class clazz)
          Get the accessor type for the specified class.
 XmlType getBaseType()
          The base type of an element accessor can be specified by an annotation.
 java.util.Collection<? extends Element> getChoices()
          The choices for this element.
 java.lang.String getDefaultValue()
          The default value, or null if none exists.
 javax.xml.bind.annotation.XmlNsForm getForm()
          The form of this element.
 java.lang.String getJsonMemberName()
          Get the name for the JSON member to which this element will be serialized.
 java.lang.String getMaxOccurs()
          The max occurs of this element.
 int getMinOccurs()
          The min occurs of this element.
 java.lang.String getName()
          The name of the accessor.
 java.lang.String getNamespace()
          The namespace of the accessor.
 javax.xml.namespace.QName getRef()
          The qname for the referenced element, if this element is a reference to a global element, or null if this element is not a reference element.
 java.lang.String getWrapperName()
          The name of the wrapper element.
 java.lang.String getWrapperNamespace()
          The namespace of the wrapper element.
 boolean isElementRefs()
          Whether this is a choice of multiple element refs.
 boolean isNillable()
          Whether this element is nillable.
 boolean isRequired()
          Whether this element is required.
 boolean isWrapped()
          Whether this xml element is wrapped.
 boolean isWrapperNillable()
          Whether the wrapper is nillable.
 
Methods inherited from class org.codehaus.enunciate.contract.jaxb.Accessor
getAccessorForXmlID, getAdapterType, getBareAccessorType, getClientSimpleName, getCollectionItemType, getMimeType, getQNameEnumRef, getReferencedFrom, getSeeAlsos, getTypeDefinition, isAdapted, isAttribute, 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

Element

public Element(com.sun.mirror.declaration.MemberDeclaration delegate,
               TypeDefinition typedef)

Element

protected Element(com.sun.mirror.declaration.MemberDeclaration delegate,
                  TypeDefinition typedef,
                  javax.xml.bind.annotation.XmlElement xmlElement)
Construct an element accessor with a specific element annotation.

Parameters:
delegate - The delegate.
typedef - The type definition.
xmlElement - The specific element annotation.
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 element.

Returns:
The form of this element.

getRef

public javax.xml.namespace.QName getRef()
The qname for the referenced element, if this element is a reference to a global element, or null if this element is not a reference element.

Overrides:
getRef in class Accessor
Returns:
The qname for the referenced element, if exists.

getAccessorType

public com.sun.mirror.type.TypeMirror getAccessorType()
The type of an element accessor can be specified by an annotation.

Overrides:
getAccessorType in class Accessor
Returns:
The accessor type.

getAccessorType

protected com.sun.mirror.type.TypeMirror getAccessorType(java.lang.Class clazz)
Get the accessor type for the specified class.

Parameters:
clazz - The class.
Returns:
The accessor type.

getBaseType

public XmlType getBaseType()
The base type of an element accessor can be specified by an annotation.

Overrides:
getBaseType in class Accessor
Returns:
The base type.

isNillable

public boolean isNillable()
Whether this element is nillable.

Returns:
Whether this element is nillable.

isRequired

public boolean isRequired()
Whether this element is required.

Returns:
Whether this element is required.

getMinOccurs

public int getMinOccurs()
The min occurs of this element.

Returns:
The min occurs of this element.

getMaxOccurs

public java.lang.String getMaxOccurs()
The max occurs of this element.

Returns:
The max occurs of this element.

getDefaultValue

public java.lang.String getDefaultValue()
The default value, or null if none exists.

Returns:
The default value, or null if none exists.

getChoices

public java.util.Collection<? extends Element> getChoices()
The choices for this element.

Returns:
The choices for this element.

isWrapped

public boolean isWrapped()
Whether this xml element is wrapped.

Returns:
Whether this xml element is wrapped.

getWrapperName

public java.lang.String getWrapperName()
The name of the wrapper element.

Returns:
The name of the wrapper element.

getWrapperNamespace

public java.lang.String getWrapperNamespace()
The namespace of the wrapper element.

Returns:
The namespace of the wrapper element.

isWrapperNillable

public boolean isWrapperNillable()
Whether the wrapper is nillable.

Returns:
Whether the wrapper is nillable.

isElementRefs

public boolean isElementRefs()
Whether this is a choice of multiple element refs.

Returns:
Whether this is a choice of multiple element refs.

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.