src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 450
b0c2840e2513
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
205 205
206 public NType getPrimitive(Class primitiveType) { 206 public NType getPrimitive(Class primitiveType) {
207 return create(primitiveType); 207 return create(primitiveType);
208 } 208 }
209 209
210 210 @SuppressWarnings("FinalStaticMethod")
211 public static final NType create(Type t) { 211 public static final NType create(Type t) {
212 if(t==null) return null; 212 if(t==null) return null;
213 if(t instanceof Class) 213 if(t instanceof Class)
214 return create((Class)t); 214 return create((Class)t);
215 215
234 } 234 }
235 235
236 public Location getClassLocation(final NClass c) { 236 public Location getClassLocation(final NClass c) {
237 // not really needed for XJC but doesn't hurt to have one 237 // not really needed for XJC but doesn't hurt to have one
238 return new Location() { 238 return new Location() {
239 @Override
239 public String toString() { 240 public String toString() {
240 return c.fullName(); 241 return c.fullName();
241 } 242 }
242 }; 243 };
243 } 244 }
244 245
245 public Location getFieldLocation(Void _) { 246 public Location getFieldLocation(Void v) {
246 throw new IllegalStateException(); 247 throw new IllegalStateException();
247 } 248 }
248 249
249 public Location getMethodLocation(Void _) { 250 public Location getMethodLocation(Void v) {
250 throw new IllegalStateException(); 251 throw new IllegalStateException();
251 } 252 }
252 253
253 public boolean hasDefaultConstructor(NClass nClass) { 254 public boolean hasDefaultConstructor(NClass nClass) {
254 throw new UnsupportedOperationException(); 255 throw new UnsupportedOperationException();

mercurial