org.codehaus.enunciate.contract.jaxb
Class Accessor

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

public abstract class Accessor
extends net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration
implements Adaptable

An accessor for a field or method value into a type.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
delegate, javaDoc
 
Constructor Summary
Accessor(com.sun.mirror.declaration.MemberDeclaration delegate, TypeDefinition typeDef)
           
 
Method Summary
 com.sun.mirror.declaration.MemberDeclaration getAccessorForXmlID()
          Returns the accessor for the XML id, or null if none was found or if this isn't an Xml IDREF accessor.
 com.sun.mirror.type.TypeMirror getAccessorType()
          The type of the accessor.
 AdapterType getAdapterType()
          The class type of the adaptor.
 com.sun.mirror.type.TypeMirror getBareAccessorType()
          The bare (i.e.
 XmlType getBaseType()
          The base xml type of the accessor.
 java.lang.String getClientSimpleName()
          The simple name for client-side code generation.
 com.sun.mirror.type.TypeMirror getCollectionItemType()
          If this is a collection type, return the type parameter of the collection, or null if this isn't a parameterized collection type.
abstract  java.lang.String getJsonMemberName()
          Get the name for the JSON member to which this element will be serialized.
 java.lang.String getMimeType()
          The suggested mime type of the binary data, or null if none.
abstract  java.lang.String getName()
          The name of the accessor.
abstract  java.lang.String getNamespace()
          The namespace of the accessor.
 com.sun.mirror.type.TypeMirror getQNameEnumRef()
          The enum type containing the known qnames for this qname enum accessor, or null is this accessor doesn't reference a known qname type.
 javax.xml.namespace.QName getRef()
          The qname for the referenced accessor, if this accessor is a reference to a global element, or null if this element is not a reference element.
 java.util.Set<java.lang.String> getReferencedFrom()
          Set of (human-readable) locations that this type definition is referenced from.
 java.util.Collection<com.sun.mirror.type.TypeMirror> getSeeAlsos()
           
 TypeDefinition getTypeDefinition()
          The type definition for this accessor.
 boolean isAdapted()
          Whether this element is adapted according to the JAXB spec.
 boolean isAttribute()
          Whether this accessor is an attribute.
 boolean isBinaryData()
          Whether this accessor consists of binary data.
 boolean isCollectionType()
          Whether the accessor type is a collection type.
 boolean isElementRef()
          Whether this accessor is an element ref.
 boolean isMTOMAttachment()
          Whether this accessor is an MTOM attachment.
 boolean isQNameType()
          Whether this access is a QName type.
 boolean isReferencesQNameEnum()
          Whether this QName accessor references a QName enum type.
 boolean isSwaRef()
          Whether this accessor is a swa ref.
 boolean isValue()
          Whether this accessor is a value.
 boolean isXmlID()
          Whether this accessor is an XML ID.
 boolean isXmlIDREF()
          Whether this accessor is an XML IDREF.
 boolean isXmlList()
          Whether this accessor is specified as an xml list.
 
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

Accessor

public Accessor(com.sun.mirror.declaration.MemberDeclaration delegate,
                TypeDefinition typeDef)
Method Detail

getName

public abstract java.lang.String getName()
The name of the accessor.

Returns:
The name of the accessor.

getNamespace

public abstract java.lang.String getNamespace()
The namespace of the accessor.

Returns:
The namespace of the accessor.

getClientSimpleName

public java.lang.String getClientSimpleName()
The simple name for client-side code generation.

Returns:
The simple name for client-side code generation.

getAccessorType

public com.sun.mirror.type.TypeMirror getAccessorType()
The type of the accessor.

Returns:
The type of the accessor.

getBareAccessorType

public com.sun.mirror.type.TypeMirror getBareAccessorType()
The bare (i.e. unwrapped) type of the accessor.

Returns:
The bare type of the accessor.

getBaseType

public XmlType getBaseType()
The base xml type of the accessor. The base type is either:

  1. The xml type of the accessor type.
  2. The xml type of the component type of the accessor type if the accessor type is a collection type.

Returns:
The base type.

getRef

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

Returns:
The qname for the referenced element, if exists.

getTypeDefinition

public TypeDefinition getTypeDefinition()
The type definition for this accessor.

Returns:
The type definition for this accessor.

isXmlList

public boolean isXmlList()
Whether this accessor is specified as an xml list.

Returns:
Whether this accessor is specified as an xml list.

isXmlID

public boolean isXmlID()
Whether this accessor is an XML ID.

Returns:
Whether this accessor is an XMLID.

isXmlIDREF

public boolean isXmlIDREF()
Whether this accessor is an XML IDREF.

Returns:
Whether this accessor is an XML IDREF.

isBinaryData

public boolean isBinaryData()
Whether this accessor consists of binary data.

Returns:
Whether this accessor consists of binary data.

isQNameType

public boolean isQNameType()
Whether this access is a QName type.

Returns:
Whether this access is a QName type.

isSwaRef

public boolean isSwaRef()
Whether this accessor is a swa ref.

Returns:
Whether this accessor is a swa ref.

isMTOMAttachment

public boolean isMTOMAttachment()
Whether this accessor is an MTOM attachment.

Returns:
Whether this accessor is an MTOM attachment.

getMimeType

public java.lang.String getMimeType()
The suggested mime type of the binary data, or null if none.

Returns:
The suggested mime type of the binary data, or null if none.

isCollectionType

public boolean isCollectionType()
Whether the accessor type is a collection type.

Returns:
Whether the accessor type is a collection type.

getCollectionItemType

public com.sun.mirror.type.TypeMirror getCollectionItemType()
If this is a collection type, return the type parameter of the collection, or null if this isn't a parameterized collection type.

Returns:
the type parameter of the collection.

getAccessorForXmlID

public com.sun.mirror.declaration.MemberDeclaration getAccessorForXmlID()
Returns the accessor for the XML id, or null if none was found or if this isn't an Xml IDREF accessor.

Returns:
The accessor, or null.

getSeeAlsos

public java.util.Collection<com.sun.mirror.type.TypeMirror> getSeeAlsos()
Returns:
The list of class names that this type definition wants you to "see also".

isAdapted

public boolean isAdapted()
Description copied from interface: Adaptable
Whether this element is adapted according to the JAXB spec.

Specified by:
isAdapted in interface Adaptable
Returns:
Whether the element is adapted.

getAdapterType

public AdapterType getAdapterType()
Description copied from interface: Adaptable
The class type of the adaptor.

Specified by:
getAdapterType in interface Adaptable
Returns:
The class type of the adaptor.

isAttribute

public boolean isAttribute()
Whether this accessor is an attribute.

Returns:
Whether this accessor is an attribute.

isValue

public boolean isValue()
Whether this accessor is a value.

Returns:
Whether this accessor is a value.

isElementRef

public boolean isElementRef()
Whether this accessor is an element ref.

Returns:
Whether this accessor is an element ref.

isReferencesQNameEnum

public boolean isReferencesQNameEnum()
Whether this QName accessor references a QName enum type.

Returns:
Whether this QName accessor references a QName enum type.

getQNameEnumRef

public com.sun.mirror.type.TypeMirror getQNameEnumRef()
The enum type containing the known qnames for this qname enum accessor, or null is this accessor doesn't reference a known qname type.

Returns:
The enum type containing the known qnames for this qname enum accessor.

getReferencedFrom

public java.util.Set<java.lang.String> getReferencedFrom()
Set of (human-readable) locations that this type definition is referenced from.

Returns:
The referenced-from list.

getJsonMemberName

public abstract java.lang.String getJsonMemberName()
Get the name for the JSON member to which this element will be serialized.

Returns:
The JSON member name.