]> git.uio.no Git - ifi-stolz-refaktor.git/blame - software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/NullMethodHandle.java
NullMethodHandle: throwing UnsupportedNullObjectOperationException instead of returni...
[ifi-stolz-refaktor.git] / software / no.uio.ifi.refaktor / src / no / uio / ifi / refaktor / utils / NullMethodHandle.java
CommitLineData
62964268
EK
1package no.uio.ifi.refaktor.utils;
2
3import org.eclipse.core.resources.IResource;
4import org.eclipse.core.runtime.IPath;
5import org.eclipse.core.runtime.IProgressMonitor;
6import org.eclipse.core.runtime.jobs.ISchedulingRule;
7import org.eclipse.jdt.core.IAnnotation;
8import org.eclipse.jdt.core.IClassFile;
9import org.eclipse.jdt.core.ICompilationUnit;
10import org.eclipse.jdt.core.IJavaElement;
11import org.eclipse.jdt.core.IJavaModel;
12import org.eclipse.jdt.core.IJavaProject;
13import org.eclipse.jdt.core.ILocalVariable;
14import org.eclipse.jdt.core.IMemberValuePair;
15import org.eclipse.jdt.core.IMethod;
16import org.eclipse.jdt.core.IOpenable;
17import org.eclipse.jdt.core.ISourceRange;
18import org.eclipse.jdt.core.IType;
19import org.eclipse.jdt.core.ITypeParameter;
20import org.eclipse.jdt.core.ITypeRoot;
21import org.eclipse.jdt.core.JavaModelException;
22
23public class NullMethodHandle implements IMethod {
24
25 @Override
26 public String[] getCategories() throws JavaModelException {
32e99b7d 27 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
28 }
29
30 @Override
31 public IClassFile getClassFile() {
32e99b7d 32 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
33 }
34
35 @Override
36 public ICompilationUnit getCompilationUnit() {
32e99b7d 37 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
38 }
39
40 @Override
41 public IType getDeclaringType() {
32e99b7d 42 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
43 }
44
45 @Override
46 public int getFlags() throws JavaModelException {
47 return 0;
48 }
49
50 @Override
51 public ISourceRange getJavadocRange() throws JavaModelException {
32e99b7d 52 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
53 }
54
55 @Override
56 public int getOccurrenceCount() {
57 return 0;
58 }
59
60 @Override
61 public ITypeRoot getTypeRoot() {
32e99b7d 62 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
63 }
64
65 @Override
66 public IType getType(String name, int occurrenceCount) {
32e99b7d 67 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
68 }
69
70 @Override
71 public boolean isBinary() {
72 return false;
73 }
74
75 @Override
76 public boolean exists() {
77 return false;
78 }
79
80 @Override
81 public IJavaElement getAncestor(int ancestorType) {
32e99b7d 82 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
83 }
84
85 @Override
86 public String getAttachedJavadoc(IProgressMonitor monitor)
87 throws JavaModelException {
32e99b7d 88 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
89 }
90
91 @Override
92 public IResource getCorrespondingResource() throws JavaModelException {
32e99b7d 93 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
94 }
95
96 @Override
97 public int getElementType() {
98 return 0;
99 }
100
101 @Override
102 public String getHandleIdentifier() {
32e99b7d 103 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
104 }
105
106 @Override
107 public IJavaModel getJavaModel() {
32e99b7d 108 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
109 }
110
111 @Override
112 public IJavaProject getJavaProject() {
32e99b7d 113 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
114 }
115
116 @Override
117 public IOpenable getOpenable() {
32e99b7d 118 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
119 }
120
121 @Override
122 public IJavaElement getParent() {
32e99b7d 123 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
124 }
125
126 @Override
127 public IPath getPath() {
32e99b7d 128 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
129 }
130
131 @Override
132 public IJavaElement getPrimaryElement() {
32e99b7d 133 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
134 }
135
136 @Override
137 public IResource getResource() {
32e99b7d 138 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
139 }
140
141 @Override
142 public ISchedulingRule getSchedulingRule() {
32e99b7d 143 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
144 }
145
146 @Override
147 public IResource getUnderlyingResource() throws JavaModelException {
32e99b7d 148 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
149 }
150
151 @Override
152 public boolean isReadOnly() {
153 return false;
154 }
155
156 @Override
157 public boolean isStructureKnown() throws JavaModelException {
158 return false;
159 }
160
161 @Override
162 public Object getAdapter(Class adapter) {
32e99b7d 163 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
164 }
165
166 @Override
167 public String getSource() throws JavaModelException {
32e99b7d 168 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
169 }
170
171 @Override
172 public ISourceRange getSourceRange() throws JavaModelException {
32e99b7d 173 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
174 }
175
176 @Override
177 public ISourceRange getNameRange() throws JavaModelException {
32e99b7d 178 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
179 }
180
181 @Override
182 public void copy(IJavaElement container, IJavaElement sibling,
183 String rename, boolean replace, IProgressMonitor monitor)
184 throws JavaModelException {
185
186 }
187
188 @Override
189 public void delete(boolean force, IProgressMonitor monitor)
190 throws JavaModelException {
191
192 }
193
194 @Override
195 public void move(IJavaElement container, IJavaElement sibling,
196 String rename, boolean replace, IProgressMonitor monitor)
197 throws JavaModelException {
198
199 }
200
201 @Override
202 public void rename(String name, boolean replace, IProgressMonitor monitor)
203 throws JavaModelException {
204
205 }
206
207 @Override
208 public IJavaElement[] getChildren() throws JavaModelException {
32e99b7d 209 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
210 }
211
212 @Override
213 public boolean hasChildren() throws JavaModelException {
214 return false;
215 }
216
217 @Override
218 public IAnnotation getAnnotation(String name) {
32e99b7d 219 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
220 }
221
222 @Override
223 public IAnnotation[] getAnnotations() throws JavaModelException {
32e99b7d 224 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
225 }
226
227 @Override
228 public IMemberValuePair getDefaultValue() throws JavaModelException {
32e99b7d 229 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
230 }
231
232 @Override
233 public String getElementName() {
32e99b7d 234 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
235 }
236
237 @Override
238 public String[] getExceptionTypes() throws JavaModelException {
32e99b7d 239 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
240 }
241
242 @Override
243 public String[] getTypeParameterSignatures() throws JavaModelException {
32e99b7d 244 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
245 }
246
247 @Override
248 public ITypeParameter[] getTypeParameters() throws JavaModelException {
32e99b7d 249 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
250 }
251
252 @Override
253 public int getNumberOfParameters() {
254 return 0;
255 }
256
257 @Override
258 public ILocalVariable[] getParameters() throws JavaModelException {
32e99b7d 259 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
260 }
261
262 @Override
263 public String getKey() {
32e99b7d 264 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
265 }
266
267 @Override
268 public String[] getParameterNames() throws JavaModelException {
32e99b7d 269 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
270 }
271
272 @Override
273 public String[] getParameterTypes() {
32e99b7d 274 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
275 }
276
277 @Override
278 public String[] getRawParameterNames() throws JavaModelException {
32e99b7d 279 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
280 }
281
282 @Override
283 public String getReturnType() throws JavaModelException {
32e99b7d 284 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
285 }
286
287 @Override
288 public String getSignature() throws JavaModelException {
32e99b7d 289 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
290 }
291
292 @Override
293 public ITypeParameter getTypeParameter(String name) {
32e99b7d 294 throw new UnsupportedNullObjectOperationException(NullMethodHandle.class);
62964268
EK
295 }
296
297 @Override
298 public boolean isConstructor() throws JavaModelException {
299 return false;
300 }
301
302 @Override
303 public boolean isMainMethod() throws JavaModelException {
304 return false;
305 }
306
307 @Override
308 public boolean isResolved() {
309 return false;
310 }
311
312 @Override
313 public boolean isSimilar(IMethod method) {
314 return false;
315 }
316}