Home » openjdk-7 » com.sun.tools » javac » comp » [javadoc | source]
com.sun.tools.javac.comp
public class: Resolve [javadoc | source]
java.lang.Object
   com.sun.tools.javac.comp.Resolve
Helper class for name resolution, used mostly by the attribution phase.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Nested Class Summary:
public static class  Resolve.InapplicableMethodException   
abstract class  Resolve.InvalidSymbolError  This class is the root class of all resolution errors caused by an invalid symbol being found during resolution. 
class  Resolve.SymbolNotFoundError  InvalidSymbolError error class indicating that a symbol matching a given name does not exists in a given site. 
class  Resolve.InapplicableSymbolError  InvalidSymbolError error class indicating that a given symbol (either a method, a constructor or an operand) is not applicable given an actual arguments/type argument list. 
class  Resolve.InapplicableSymbolsError  ResolveError error class indicating that a set of symbols (either methods, constructors or operands) is not applicable given an actual arguments/type argument list. 
class  Resolve.AccessError  An InvalidSymbolError error class indicating that a symbol is not accessible from a given site 
class  Resolve.StaticError  InvalidSymbolError error class indicating that an instance member has erroneously been accessed from a static context. 
class  Resolve.AmbiguityError  InvalidSymbolError error class indicating that a pair of symbols (either methods, constructors or operands) are ambiguous given an actual arguments/type argument list. 
enum class  Resolve.MethodResolutionPhase   
Field Summary
protected static final  Key<Resolve> resolveKey     
 Names names     
 Log log     
 Symtab syms     
 Check chk     
 Infer infer     
 ClassReader reader     
 TreeInfo treeinfo     
 Types types     
 Factory diags     
public final  boolean boxingEnabled     
public final  boolean varargsEnabled     
public final  boolean allowMethodHandles     
 Scope polymorphicSignatureScope     
final  SymbolNotFoundError varNotFound    error symbols, which are returned when resolution fails 
final  InapplicableSymbolError wrongMethod     
final  InapplicableSymbolsError wrongMethods     
final  SymbolNotFoundError methodNotFound     
final  SymbolNotFoundError typeNotFound     
 Warner noteWarner     
final  List<MethodResolutionPhase> methodResolutionSteps     
Constructor:
 protected Resolve(Context context) 
Method from com.sun.tools.javac.comp.Resolve Summary:
access,   access,   access,   access,   ambiguityError,   argumentsAcceptable,   checkNonAbstract,   checkRawArgumentsAcceptable,   findField,   findFun,   findGlobalType,   findIdent,   findIdentInPackage,   findIdentInType,   findMemberType,   findMethod,   findPolymorphicSignatureInstance,   findType,   findVar,   instance,   instantiate,   isAccessible,   isAccessible,   isAccessible,   isAccessible,   isAccessible,   isAccessible,   isInitializer,   isStatic,   loadClass,   logAccessError,   methodArguments,   mostSpecific,   printscopes,   printscopes,   printscopes,   rawInstantiate,   resolveBinaryOperator,   resolveConstructor,   resolveConstructor,   resolveDiamond,   resolveIdent,   resolveImplicitThis,   resolveImplicitThis,   resolveInternalConstructor,   resolveInternalField,   resolveInternalMethod,   resolveMethod,   resolveOperator,   resolveQualifiedMethod,   resolveQualifiedMethod,   resolveSelf,   resolveSelfContaining,   resolveUnaryOperator,   selectBest
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.comp.Resolve Detail:
 Symbol access(Symbol sym,
    DiagnosticPosition pos,
    Type site,
    Name name,
    boolean qualified) 
    Same as original access(), but without location, type arguments and arguments.
 Symbol access(Symbol sym,
    DiagnosticPosition pos,
    Symbol location,
    Type site,
    Name name,
    boolean qualified) 
    Same as original access(), but without type arguments and arguments.
 Symbol access(Symbol sym,
    DiagnosticPosition pos,
    Type site,
    Name name,
    boolean qualified,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    Same as original access(), but without location.
 Symbol access(Symbol sym,
    DiagnosticPosition pos,
    Symbol location,
    Type site,
    Name name,
    boolean qualified,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    If `sym' is a bad symbol: report error and return errSymbol else pass through unchanged, additional arguments duplicate what has been used in trying to find the symbol (--> flyweight pattern). This improves performance since we expect misses to happen frequently.
 Symbol ambiguityError(Symbol m1,
    Symbol m2) 
 boolean argumentsAcceptable(Env<AttrContext> env,
    List<Type> argtypes,
    List<Type> formals,
    boolean allowBoxing,
    boolean useVarargs,
    Warner warn) 
    Check if a parameter list accepts a list of args.
  void checkNonAbstract(DiagnosticPosition pos,
    Symbol sym) 
    Check that sym is not an abstract method.
  void checkRawArgumentsAcceptable(Env<AttrContext> env,
    List<Type> argtypes,
    List<Type> formals,
    boolean allowBoxing,
    boolean useVarargs,
    Warner warn) 
 Symbol findField(Env<AttrContext> env,
    Type site,
    Name name,
    TypeSymbol c) 
    Find field. Synthetic fields are always skipped.
 Symbol findFun(Env<AttrContext> env,
    Name name,
    List<Type> argtypes,
    List<Type> typeargtypes,
    boolean allowBoxing,
    boolean useVarargs) 
    Find unqualified method matching given name, type and value arguments.
 Symbol findGlobalType(Env<AttrContext> env,
    Scope scope,
    Name name) 
    Find a global type in given scope and load corresponding class.
 Symbol findIdent(Env<AttrContext> env,
    Name name,
    int kind) 
    Find an unqualified identifier which matches a specified kind set.
 Symbol findIdentInPackage(Env<AttrContext> env,
    TypeSymbol pck,
    Name name,
    int kind) 
    Find an identifier in a package which matches a specified kind set.
 Symbol findIdentInType(Env<AttrContext> env,
    Type site,
    Name name,
    int kind) 
    Find an identifier among the members of a given type `site'.
 Symbol findMemberType(Env<AttrContext> env,
    Type site,
    Name name,
    TypeSymbol c) 
    Find qualified member type.
 Symbol findMethod(Env<AttrContext> env,
    Type site,
    Name name,
    List<Type> argtypes,
    List<Type> typeargtypes,
    boolean allowBoxing,
    boolean useVarargs,
    boolean operator) 
    Find best qualified method matching given name, type and value arguments.
 Symbol findPolymorphicSignatureInstance(Env<AttrContext> env,
    Type site,
    Name name,
    MethodSymbol spMethod,
    List<Type> argtypes) 
    Find or create an implicit method of exactly the given type (after erasure). Searches in a side table, not the main scope of the site. This emulates the lookup process required by JSR 292 in JVM.
 Symbol findType(Env<AttrContext> env,
    Name name) 
    Find an unqualified type symbol.
 Symbol findVar(Env<AttrContext> env,
    Name name) 
    Find unqualified variable or field with given name. Synthetic fields always skipped.
 public static Resolve instance(Context context) 
 Type instantiate(Env<AttrContext> env,
    Type site,
    Symbol m,
    List<Type> argtypes,
    List<Type> typeargtypes,
    boolean allowBoxing,
    boolean useVarargs,
    Warner warn) 
    Same but returns null instead throwing a NoInstanceException
 public boolean isAccessible(Env<AttrContext> env,
    TypeSymbol c) 
    Is class accessible in given evironment?
 boolean isAccessible(Env<AttrContext> env,
    Type t) 
 public boolean isAccessible(Env<AttrContext> env,
    TypeSymbol c,
    boolean checkInner) 
 boolean isAccessible(Env<AttrContext> env,
    Type t,
    boolean checkInner) 
 public boolean isAccessible(Env<AttrContext> env,
    Type site,
    Symbol sym) 
    Is symbol accessible as a member of given type in given evironment?
 public boolean isAccessible(Env<AttrContext> env,
    Type site,
    Symbol sym,
    boolean checkInner) 
 static boolean isInitializer(Env<AttrContext> env) 
    An environment is an "initializer" if it is a constructor or an instance initializer.
 static boolean isStatic(Env<AttrContext> env) 
    An environment is "static" if its static level is greater than the one of its outer environment
 Symbol loadClass(Env<AttrContext> env,
    Name name) 
    Load toplevel or member class with given fully qualified name and verify that it is accessible.
 public  void logAccessError(Env<AttrContext> env,
    JCTree tree,
    Type type) 
 public Object methodArguments(List<Type> argtypes) 
 Symbol mostSpecific(Symbol m1,
    Symbol m2,
    Env<AttrContext> env,
    Type site,
    boolean allowBoxing,
    boolean useVarargs) 
 public  void printscopes(Scope s) 
    print all scopes starting with scope s and proceeding outwards. used for debugging.
  void printscopes(Env<AttrContext> env) 
 public  void printscopes(Type t) 
 Type rawInstantiate(Env<AttrContext> env,
    Type site,
    Symbol m,
    List<Type> argtypes,
    List<Type> typeargtypes,
    boolean allowBoxing,
    boolean useVarargs,
    Warner warn) throws InferenceException 
    Try to instantiate the type of a method so that it fits given type arguments and argument types. If succesful, return the method's instantiated type, else return null. The instantiation will take into account an additional leading formal parameter if the method is an instance method seen as a member of un underdetermined site In this case, we treat site as an additional parameter and the parameters of the class containing the method as additional type variables that get instantiated.
 Symbol resolveBinaryOperator(DiagnosticPosition pos,
    int optag,
    Env<AttrContext> env,
    Type left,
    Type right) 
    Resolve binary operator.
 Symbol resolveConstructor(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type site,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    Resolve constructor.
 Symbol resolveConstructor(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type site,
    List<Type> argtypes,
    List<Type> typeargtypes,
    boolean allowBoxing,
    boolean useVarargs) 
    Resolve constructor.
 Symbol resolveDiamond(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type site,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    Resolve constructor using diamond inference.
 Symbol resolveIdent(DiagnosticPosition pos,
    Env<AttrContext> env,
    Name name,
    int kind) 
    Resolve an unqualified (non-method) identifier.
 Type resolveImplicitThis(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type t) 
    Resolve an appropriate implicit this instance for t's container. JLS 8.8.5.1 and 15.9.2
 Type resolveImplicitThis(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type t,
    boolean isSuperCall) 
 public MethodSymbol resolveInternalConstructor(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type site,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    Resolve a constructor, throw a fatal error if not found.
 public VarSymbol resolveInternalField(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type site,
    Name name) 
    Resolve a field identifier, throw a fatal error if not found.
 public MethodSymbol resolveInternalMethod(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type site,
    Name name,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    Resolve a qualified method identifier, throw a fatal error if not found.
 Symbol resolveMethod(DiagnosticPosition pos,
    Env<AttrContext> env,
    Name name,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    Resolve an unqualified method identifier.
 Symbol resolveOperator(DiagnosticPosition pos,
    int optag,
    Env<AttrContext> env,
    List<Type> argtypes) 
    Resolve operator.
 Symbol resolveQualifiedMethod(DiagnosticPosition pos,
    Env<AttrContext> env,
    Type site,
    Name name,
    List<Type> argtypes,
    List<Type> typeargtypes) 
    Resolve a qualified method identifier
 Symbol resolveQualifiedMethod(DiagnosticPosition pos,
    Env<AttrContext> env,
    Symbol location,
    Type site,
    Name name,
    List<Type> argtypes,
    List<Type> typeargtypes) 
 Symbol resolveSelf(DiagnosticPosition pos,
    Env<AttrContext> env,
    TypeSymbol c,
    Name name) 
    Resolve `c.name' where name == this or name == super.
 Symbol resolveSelfContaining(DiagnosticPosition pos,
    Env<AttrContext> env,
    Symbol member,
    boolean isSuperCall) 
    Resolve `c.this' for an enclosing class c that contains the named member.
 Symbol resolveUnaryOperator(DiagnosticPosition pos,
    int optag,
    Env<AttrContext> env,
    Type arg) 
    Resolve operator.
 Symbol selectBest(Env<AttrContext> env,
    Type site,
    List<Type> argtypes,
    List<Type> typeargtypes,
    Symbol sym,
    Symbol bestSoFar,
    boolean allowBoxing,
    boolean useVarargs,
    boolean operator) 
    Select the best method for a call site among two choices.