1.1 --- a/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Thu Sep 04 14:56:35 2008 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Tue Sep 09 10:28:21 2008 -0700 1.3 @@ -322,4 +322,18 @@ 1.4 return t2; 1.5 } 1.6 } 1.7 + 1.8 + /** 1.9 + * Gets the original type from the ErrorType object. 1.10 + * @param errorType The errorType for which we want to get the original type. 1.11 + * @returns TypeMirror corresponding to the original type, replaced by the ErrorType. 1.12 + * noType (type.tag == NONE) is returned if there is no original type. 1.13 + */ 1.14 + public TypeMirror getOriginalType(javax.lang.model.type.ErrorType errorType) { 1.15 + if (errorType instanceof com.sun.tools.javac.code.Type.ErrorType) { 1.16 + return ((com.sun.tools.javac.code.Type.ErrorType)errorType).getOriginalType(); 1.17 + } 1.18 + 1.19 + return com.sun.tools.javac.code.Type.noType; 1.20 + } 1.21 }