com.sun.tools.javac.comp
abstract class: Resolve.ResolveError [javadoc |
source]
java.lang.Object
com.sun.tools.javac.code.Symbol
com.sun.tools.javac.comp.Resolve$ResolveError
All Implemented Interfaces:
Element
Direct Known Subclasses:
StaticError, InvalidSymbolError, AmbiguityError, InapplicableSymbolsError, SymbolNotFoundError, InapplicableSymbolError, AccessError
Root class for resolution errors. Subclass of ResolveError
represent a different kinds of resolution error - as such they must
specify how they map into concrete compiler diagnostics.
Field Summary |
---|
final String | debugName | The name of the kind of error, for debugging only. |
Methods from com.sun.tools.javac.code.Symbol: |
---|
accept, asMemberOf, asType, attribute, clone, complete, enclClass, erasure, exists, externalType, flags, flatName, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getQualifiedName, getSimpleName, getTypeParameters, hasOuterInstance, isAnonymous, isConstructor, isEnclosedBy, isInheritedIn, isInner, isInterface, isLocal, isMemberOf, isPolymorphicSignatureGeneric, isPolymorphicSignatureInstance, isStatic, isSubClass, location, location, members, outermostClass, overrides, packge, toString |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from com.sun.tools.javac.comp.Resolve$ResolveError Detail: |
public R accept(ElementVisitor<R, P> v,
P p) {
throw new AssertionError();
}
|
protected Symbol access(Name name,
TypeSymbol location) {
return types.createErrorType(name, location, syms.errSymbol.type).tsym;
}
Create an external representation for this erroneous symbol to be
used during attribution - by default this returns the symbol of a
brand new error type which stores the original type found
during resolution. |
public boolean exists() {
return false;
}
|
abstract JCDiagnostic getDiagnostic(DiagnosticType dkind,
DiagnosticPosition pos,
Symbol location,
Type site,
Name name,
List<Type> argtypes,
List<Type> typeargtypes)
Create a diagnostic representing this resolution error. |
boolean isOperator(Name name) {
int i = 0;
while (i < name.getByteLength() &&
"+-~!*/%&|^< >=".indexOf(name.getByteAt(i)) >= 0) i++;
return i > 0 && i == name.getByteLength();
}
A name designates an operator if it consists
of a non-empty sequence of operator symbols +-~!/*%&|^<>= |
public String toString() {
return debugName;
}
|