Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 848b54d55fd08b621739a018aaa952f23e0ed580 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*******************************************************************************
 * Copyright (c) 2010, 2011 Oracle. All rights reserved.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0, which accompanies this distribution
 * and is available at http://www.eclipse.org/legal/epl-v10.html.
 * 
 * Contributors:
 *     Oracle - initial API and implementation
 ******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.resource.java;

import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jaxb.core.resource.java.JAXB;
import org.eclipse.jpt.jaxb.core.resource.java.XmlTypeAnnotation;

/**
 * javax.xml.bind.annotation.XmlType
 */
public final class NullXmlTypeAnnotation
	extends NullAnnotation
	implements XmlTypeAnnotation
{
	protected NullXmlTypeAnnotation(JavaResourceNode parent) {
		super(parent);
	}

	public String getAnnotationName() {
		return JAXB.XML_TYPE;
	}

	@Override
	protected XmlTypeAnnotation addAnnotation() {
		return (XmlTypeAnnotation) super.addAnnotation();
	}


	// ********** XmlTypeAnnotation implementation **********

	// ***** factory class
	public String getFactoryClass() {
		return null;
	}

	public String getFullyQualifiedFactoryClassName() {
		return null;
	}

	public void setFactoryClass(String factoryClass) {
		if (factoryClass != null) {
			this.addAnnotation().setFactoryClass(factoryClass);
		}
	}

	public TextRange getFactoryClassTextRange(CompilationUnit astRoot) {
		return null;
	}

	// ***** factory method
	public String getFactoryMethod() {
		return null;
	}

	public void setFactoryMethod(String factoryMethod) {
		if (factoryMethod != null) {
			this.addAnnotation().setFactoryMethod(factoryMethod);
		}
	}

	public TextRange getFactoryMethodTextRange(CompilationUnit astRoot) {
		return null;
	}

	// ***** name
	public String getName() {
		return null;
	}

	public void setName(String name) {
		if (name != null) {
			this.addAnnotation().setName(name);
		}
	}
	
	public TextRange getNameTextRange(CompilationUnit astRoot) {
		return null;
	}
	
	public boolean nameTouches(int pos, CompilationUnit astRoot) {
		return false;
	}
	
	
	// ***** namespace
	public String getNamespace() {
		return null;
	}

	public void setNamespace(String namespace) {
		if (namespace != null) {
			this.addAnnotation().setNamespace(namespace);
		}
	}

	public TextRange getNamespaceTextRange(CompilationUnit astRoot) {
		return null;
	}
	
	public boolean namespaceTouches(int pos, CompilationUnit astRoot) {
		return false;
	}
	
	
	public ListIterable<String> getPropOrder() {
		return EmptyListIterable.instance();
	}

	public int getPropOrderSize() {
		return 0;
	}

	public void addProp(int index, String prop) {
		this.addAnnotation().addProp(index, prop);
	}

	public void addProp(String prop) {
		this.addAnnotation().addProp(prop);
	}

	public void moveProp(int targetIndex, int sourceIndex) {
		throw new UnsupportedOperationException();
	}

	public void removeProp(int index) {
		throw new UnsupportedOperationException();
	}

	public void removeProp(String prop) {
		throw new UnsupportedOperationException();
	}
	
	public TextRange getPropOrderTextRange(CompilationUnit astRoot) {
		return null;
	}
	
	public boolean propOrderTouches(int pos, CompilationUnit astRoot) {
		return false;
	}
	
	public TextRange getPropTextRange(int index, CompilationUnit astRoot) {
		return null;
	}
	
	public boolean propTouches(int index, int pos, CompilationUnit astRoot) {
		return false;
	}
}

Back to the top