com.sun.tools.javac.comp
Class Resolve.ResolveError

java.lang.Object
  extended by com.sun.tools.javac.code.Symbol
      extended by com.sun.tools.javac.comp.Resolve.ResolveError
All Implemented Interfaces:
Element
Direct Known Subclasses:
Resolve.AccessError, Resolve.AmbiguityError, Resolve.StaticError
Enclosing class:
Resolve

private class Resolve.ResolveError
extends Symbol

Root class for resolve errors. Instances of this class indicate "Symbol not found". Instances of subclass indicate other errors.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.tools.javac.code.Symbol
Symbol.ClassSymbol, Symbol.Completer, Symbol.CompletionFailure, Symbol.DelegatedSymbol, Symbol.Level, Symbol.MethodSymbol, Symbol.OperatorSymbol, Symbol.PackageSymbol, Symbol.TypeSymbol, Symbol.VarSymbol, Symbol.Visitor<R,P>
 
Field Summary
(package private)  java.lang.String debugName
          The name of the kind of error, for debugging only.
(package private)  JCDiagnostic explanation
          An auxiliary explanation set in case of instantiation errors.
(package private)  Symbol sym
          The symbol that was determined by resolution, or errSymbol if none was found.
(package private)  Symbol wrongSym
          The symbol that was a close mismatch, or null if none was found.
 
Fields inherited from class com.sun.tools.javac.code.Symbol
attributes_field, completer, erasure_field, flags_field, kind, level, name, owner, type
 
Constructor Summary
Resolve.ResolveError(int kind, Symbol sym, java.lang.String debugName)
           
 
Method Summary
<R,P> R
accept(ElementVisitor<R,P> v, P p)
          Applies a visitor to this element.
 boolean exists()
          True if the symbol represents an entity that exists.
(package private)  java.lang.String getErrorKey(java.lang.String key, List<Type> argtypes, List<Type> typeargtypes, Kinds.KindName kindname)
           
(package private)  boolean isOperator(Name name)
          A name designates an operator if it consists of a non-empty sequence of operator symbols +-~!/*%&|^<>=
(package private)  void report(Log log, JCDiagnostic.DiagnosticPosition pos, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes)
          Report error.
(package private)  Resolve.ResolveError setWrongSym(Symbol sym)
          Update wrongSym and return this.
(package private)  Resolve.ResolveError setWrongSym(Symbol sym, JCDiagnostic explanation)
          Update wrongSym and explanation and return this.
 java.lang.String toString()
          Print the (debug only) name of the kind of error.
 
Methods inherited from class com.sun.tools.javac.code.Symbol
accept, addParentLevel, asMemberOf, asType, attribute, clone, complete, enclClass, erasure, externalType, flags, flatName, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getKind, getLevel, getModifiers, getQualifiedName, getSimpleName, getTypeParameters, hasOuterInstance, isConstructor, isEnclosedBy, isInheritedIn, isInner, isInterface, isLocal, isMemberOf, isStatic, isSubClass, location, location, members, outermostClass, overrides, packge, removeParentLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.lang.model.element.Element
equals, hashCode
 

Field Detail

debugName

final java.lang.String debugName
The name of the kind of error, for debugging only.


sym

final Symbol sym
The symbol that was determined by resolution, or errSymbol if none was found.


wrongSym

Symbol wrongSym
The symbol that was a close mismatch, or null if none was found. wrongSym is currently set if a simgle method with the correct name, but the wrong parameters was found.


explanation

JCDiagnostic explanation
An auxiliary explanation set in case of instantiation errors.

Constructor Detail

Resolve.ResolveError

Resolve.ResolveError(int kind,
                     Symbol sym,
                     java.lang.String debugName)
Method Detail

accept

public <R,P> R accept(ElementVisitor<R,P> v,
                      P p)
Description copied from interface: Element
Applies a visitor to this element.

Type Parameters:
R - the return type of the visitor's methods
P - the type of the additional parameter to the visitor's methods
Parameters:
v - the visitor operating on this element
p - additional parameter to the visitor
Returns:
a visitor-specified result

toString

public java.lang.String toString()
Print the (debug only) name of the kind of error.

Overrides:
toString in class Symbol

setWrongSym

Resolve.ResolveError setWrongSym(Symbol sym,
                                 JCDiagnostic explanation)
Update wrongSym and explanation and return this.


setWrongSym

Resolve.ResolveError setWrongSym(Symbol sym)
Update wrongSym and return this.


exists

public boolean exists()
Description copied from class: Symbol
True if the symbol represents an entity that exists.

Overrides:
exists in class Symbol

report

void report(Log log,
            JCDiagnostic.DiagnosticPosition pos,
            Type site,
            Name name,
            List<Type> argtypes,
            List<Type> typeargtypes)
Report error.

Parameters:
log - The error log to be used for error reporting.
pos - The position to be used for error reporting.
site - The original type from where the selection took place.
name - The name of the symbol to be resolved.
argtypes - The invocation's value arguments, if we looked for a method.
typeargtypes - The invocation's type arguments, if we looked for a method.

getErrorKey

java.lang.String getErrorKey(java.lang.String key,
                             List<Type> argtypes,
                             List<Type> typeargtypes,
                             Kinds.KindName kindname)

isOperator

boolean isOperator(Name name)
A name designates an operator if it consists of a non-empty sequence of operator symbols +-~!/*%&|^<>=