6557752: Original type of an AST should be made available even if it is replaced with an ErrorType

Reviewed-by: mcimadamore
This commit is contained in:
Jonathan Gibbons 2008-09-09 10:28:21 -07:00
parent 9f4b8c2379
commit 8166ad7ece
13 changed files with 228 additions and 52 deletions

View file

@ -33,6 +33,7 @@ import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.ErrorType;
import javax.lang.model.type.TypeMirror;
import javax.tools.JavaCompiler.CompilationTask;
@ -177,4 +178,11 @@ public abstract class Trees {
* @return true if {@code member} is accessible in {@code type}
*/
public abstract boolean isAccessible(Scope scope, Element member, DeclaredType type);
/**
* Gets the original type from the ErrorType object.
* @param errorType The errorType for which we want to get the original type.
* @returns javax.lang.model.type.TypeMirror corresponding to the original type, replaced by the ErrorType.
*/
public abstract TypeMirror getOriginalType(ErrorType errorType);
}