Dali Provisional API
Release 3.2

org.eclipse.jpt.jaxb.core.resource.java
Interface XmlTypeAnnotation

All Superinterfaces:
Annotation, JavaResourceNode, Model, QNameAnnotation

public interface XmlTypeAnnotation
extends QNameAnnotation

Corresponds to the JAXB annotation javax.xml.bind.annotation.XmlType Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
3.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceNode
JavaResourceNode.FileTransformer, JavaResourceNode.Root
 
Field Summary
static String DEFAULT_FACTORY_CLASS
           
static String[] DEFAULT_PROP_ORDER
          A single element empty string array should be interpreted as unspecified
static String FACTORY_CLASS_PROPERTY
           
static String FACTORY_METHOD_PROPERTY
           
static String FULLY_QUALIFIED_FACTORY_CLASS_NAME_PROPERTY
           
static String PROP_ORDER_LIST
           
 
Fields inherited from interface org.eclipse.jpt.jaxb.core.resource.java.QNameAnnotation
NAME_PROPERTY, NAMESPACE_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceNode
FILE_TRANSFORMER
 
Method Summary
 void addProp(int index, String prop)
          Corresponds to the 'propOrder' element of the XmlType annotation.
 void addProp(String prop)
          Corresponds to the 'propOrder' element of the XmlType annotation.
 String getFactoryClass()
          Corresponds to the 'factoryClass' element of the XmlType annotation.
 TextRange getFactoryClassTextRange()
          Return the TextRange for the 'factoryClass' element.
 String getFactoryMethod()
          Corresponds to the 'factoryMethod' element of the XmlType annotation.
 TextRange getFactoryMethodTextRange()
          Return the TextRange for the 'factoryMethod' element.
 String getFullyQualifiedFactoryClassName()
          Return the fully-qualified factory class name as resolved by the AST's bindings.
 org.eclipse.jpt.common.utility.iterable.ListIterable<String> getPropOrder()
          Corresponds to the 'propOrder' element of the XmlType annotation.
 int getPropOrderSize()
          Corresponds to the 'propOrder' element of the XmlType annotation.
 TextRange getPropOrderTextRange()
          Return the text range of the 'propOrder' element of the XmlType annotation.
 TextRange getPropTextRange(int index)
          Return the text range of the prop at the specified index
 void moveProp(int targetIndex, int sourceIndex)
          Corresponds to the 'propOrder' element of the XmlType annotation.
 boolean propOrderTouches(int pos)
          Return whether the specified position touches the 'propOrder' element.
 boolean propTouches(int index, int pos)
          Return whether the specified position touches the prop at the specified index.
 void removeProp(int index)
          Corresponds to the 'propOrder' element of the XmlType annotation.
 void removeProp(String prop)
          Corresponds to the 'propOrder' element of the XmlType annotation.
 void setFactoryClass(String factoryClass)
          Corresponds to the 'factoryClass' element of the XmlType annotation.
 void setFactoryMethod(String factoryMethod)
          Corresponds to the 'factoryMethod' element of the XmlType annotation.
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.resource.java.QNameAnnotation
getName, getNamespace, getNamespaceTextRange, getNameTextRange, namespaceTouches, nameTouches, setName, setNamespace
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.Annotation
getAnnotationName, getAstAnnotation, initialize, initialize, isUnset, newAnnotation, removeAnnotation, synchronizeWith, synchronizeWith
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceNode
getFile, getJavaResourceCompilationUnit, getParent, getRoot, getTextRange
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 

Field Detail

FACTORY_CLASS_PROPERTY

static final String FACTORY_CLASS_PROPERTY
See Also:
Constant Field Values

DEFAULT_FACTORY_CLASS

static final String DEFAULT_FACTORY_CLASS
See Also:
Constant Field Values

FULLY_QUALIFIED_FACTORY_CLASS_NAME_PROPERTY

static final String FULLY_QUALIFIED_FACTORY_CLASS_NAME_PROPERTY
See Also:
Constant Field Values

FACTORY_METHOD_PROPERTY

static final String FACTORY_METHOD_PROPERTY
See Also:
Constant Field Values

PROP_ORDER_LIST

static final String PROP_ORDER_LIST
See Also:
Constant Field Values

DEFAULT_PROP_ORDER

static final String[] DEFAULT_PROP_ORDER
A single element empty string array should be interpreted as unspecified

Method Detail

getFactoryClass

String getFactoryClass()
Corresponds to the 'factoryClass' element of the XmlType annotation. Return null if the element does not exist in Java. Return the portion of the value preceding ".class".
     @XmlType(name="USAddressType", factoryClass=USAddressFactory.class)
 
will return "USAddressFactory"


setFactoryClass

void setFactoryClass(String factoryClass)
Corresponds to the 'factoryClass' element of the XmlType annotation. Set to null to remove the element.


getFactoryClassTextRange

TextRange getFactoryClassTextRange()
Return the TextRange for the 'factoryClass' element. If the element does not exist return the TextRange for the XmlType annotation.


getFullyQualifiedFactoryClassName

String getFullyQualifiedFactoryClassName()
Return the fully-qualified factory class name as resolved by the AST's bindings.
     @XmlType(name="USAddressType", factoryClass=USAddressFactory.class)
 
will return "model.USAddressFactory" if there is an import for model.USAddressFactory.

Returns:

getFactoryMethod

String getFactoryMethod()
Corresponds to the 'factoryMethod' element of the XmlType annotation. Return null if the element does not exist in Java.


setFactoryMethod

void setFactoryMethod(String factoryMethod)
Corresponds to the 'factoryMethod' element of the XmlType annotation. Set to null to remove the element.


getFactoryMethodTextRange

TextRange getFactoryMethodTextRange()
Return the TextRange for the 'factoryMethod' element. If the element does not exist return the TextRange for the XmlType annotation.


getPropOrder

org.eclipse.jpt.common.utility.iterable.ListIterable<String> getPropOrder()
Corresponds to the 'propOrder' element of the XmlType annotation. Return an empty iterator if the element does not exist in Java.


getPropOrderSize

int getPropOrderSize()
Corresponds to the 'propOrder' element of the XmlType annotation.


addProp

void addProp(String prop)
Corresponds to the 'propOrder' element of the XmlType annotation.


addProp

void addProp(int index,
             String prop)
Corresponds to the 'propOrder' element of the XmlType annotation.


moveProp

void moveProp(int targetIndex,
              int sourceIndex)
Corresponds to the 'propOrder' element of the XmlType annotation.


removeProp

void removeProp(String prop)
Corresponds to the 'propOrder' element of the XmlType annotation.


removeProp

void removeProp(int index)
Corresponds to the 'propOrder' element of the XmlType annotation.


getPropOrderTextRange

TextRange getPropOrderTextRange()
Return the text range of the 'propOrder' element of the XmlType annotation.


propOrderTouches

boolean propOrderTouches(int pos)
Return whether the specified position touches the 'propOrder' element. Return false if the element does not exist.


getPropTextRange

TextRange getPropTextRange(int index)
Return the text range of the prop at the specified index

Throws:
ArrayIndexOutOfBoundsException - if the index is out of range

propTouches

boolean propTouches(int index,
                    int pos)
Return whether the specified position touches the prop at the specified index.

Throws:
ArrayIndexOutOfBoundsException - if the index is out of range

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.