src/share/classes/com/sun/tools/javah/TypeSignature.java

changeset 1054
111bbf1ad913
parent 798
4868a36f6fd8
child 2525
2eb010b6cb22
equal deleted inserted replaced
1053:0d8edba73d70 1054:111bbf1ad913
1 /* 1 /*
2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 2011, 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
36 import javax.lang.model.type.TypeKind; 36 import javax.lang.model.type.TypeKind;
37 import javax.lang.model.type.TypeMirror; 37 import javax.lang.model.type.TypeMirror;
38 import javax.lang.model.type.TypeVariable; 38 import javax.lang.model.type.TypeVariable;
39 import javax.lang.model.type.TypeVisitor; 39 import javax.lang.model.type.TypeVisitor;
40 import javax.lang.model.util.Elements; 40 import javax.lang.model.util.Elements;
41 import javax.lang.model.util.SimpleTypeVisitor7; 41 import javax.lang.model.util.SimpleTypeVisitor8;
42 42
43 /** 43 /**
44 * Returns internal type signature. 44 * Returns internal type signature.
45 * 45 *
46 * <p><b>This is NOT part of any supported API. 46 * <p><b>This is NOT part of any supported API.
243 return 1 + dimensions(((ArrayType) t).getComponentType()); 243 return 1 + dimensions(((ArrayType) t).getComponentType());
244 } 244 }
245 245
246 246
247 String qualifiedTypeName(TypeMirror type) { 247 String qualifiedTypeName(TypeMirror type) {
248 TypeVisitor<Name, Void> v = new SimpleTypeVisitor7<Name, Void>() { 248 TypeVisitor<Name, Void> v = new SimpleTypeVisitor8<Name, Void>() {
249 @Override 249 @Override
250 public Name visitArray(ArrayType t, Void p) { 250 public Name visitArray(ArrayType t, Void p) {
251 return t.getComponentType().accept(this, p); 251 return t.getComponentType().accept(this, p);
252 } 252 }
253 253

mercurial