public class Resolve extends Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
Resolve.InapplicableMethodException |
Modifier and Type | Field and Description |
---|---|
boolean |
allowDefaultMethods |
boolean |
allowMethodHandles |
boolean |
allowStructuralMostSpecific |
boolean |
boxingEnabled |
protected static Context.Key<Resolve> |
resolveKey |
boolean |
varargsEnabled |
Modifier | Constructor and Description |
---|---|
protected |
Resolve(Context context) |
Modifier and Type | Method and Description |
---|---|
static Resolve |
instance(Context context) |
boolean |
isAccessible(Env<AttrContext> env,
Symbol.TypeSymbol c)
Is class accessible in given evironment?
|
boolean |
isAccessible(Env<AttrContext> env,
Symbol.TypeSymbol c,
boolean checkInner) |
boolean |
isAccessible(Env<AttrContext> env,
Type site,
Symbol sym)
Is symbol accessible as a member of given type in given environment?
|
boolean |
isAccessible(Env<AttrContext> env,
Type site,
Symbol sym,
boolean checkInner) |
protected static boolean |
isStatic(Env<AttrContext> env)
An environment is "static" if its static level is greater than
the one of its outer environment
|
void |
logAccessErrorInternal(Env<AttrContext> env,
JCTree tree,
Type type) |
Object |
methodArguments(List<Type> argtypes) |
void |
printscopes(Scope s)
print all scopes starting with scope s and proceeding outwards.
|
void |
printscopes(Type t) |
void |
reportDependence(Symbol from,
Symbol to)
Report dependencies.
|
Symbol.MethodSymbol |
resolveInternalConstructor(JCDiagnostic.DiagnosticPosition pos,
Env<AttrContext> env,
Type site,
List<Type> argtypes,
List<Type> typeargtypes)
Resolve a constructor, throw a fatal error if not found.
|
Symbol.VarSymbol |
resolveInternalField(JCDiagnostic.DiagnosticPosition pos,
Env<AttrContext> env,
Type site,
Name name)
Resolve a field identifier, throw a fatal error if not found.
|
Symbol.MethodSymbol |
resolveInternalMethod(JCDiagnostic.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.
|
protected static final Context.Key<Resolve> resolveKey
public final boolean boxingEnabled
public final boolean varargsEnabled
public final boolean allowMethodHandles
public final boolean allowDefaultMethods
public final boolean allowStructuralMostSpecific
protected Resolve(Context context)
protected static boolean isStatic(Env<AttrContext> env)
public boolean isAccessible(Env<AttrContext> env, Symbol.TypeSymbol c)
env
- The current environment.c
- The class whose accessibility is checked.public boolean isAccessible(Env<AttrContext> env, Symbol.TypeSymbol c, boolean checkInner)
public boolean isAccessible(Env<AttrContext> env, Type site, Symbol sym)
env
- The current environment.site
- The type of which the tested symbol is regarded
as a member.sym
- The symbol.public boolean isAccessible(Env<AttrContext> env, Type site, Symbol sym, boolean checkInner)
public Symbol.VarSymbol resolveInternalField(JCDiagnostic.DiagnosticPosition pos, Env<AttrContext> env, Type site, Name name)
pos
- The position to use for error reporting.env
- The environment current at the method invocation.site
- The type of the qualifying expression, in which
identifier is searched.name
- The identifier's name.public void reportDependence(Symbol from, Symbol to)
from
- The enclosing class symto
- The found identifier that the class depends on.public void printscopes(Scope s)
public void printscopes(Type t)
public Symbol.MethodSymbol resolveInternalMethod(JCDiagnostic.DiagnosticPosition pos, Env<AttrContext> env, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes)
pos
- The position to use for error reporting.env
- The environment current at the method invocation.site
- The type of the qualifying expression, in which
identifier is searched.name
- The identifier's name.argtypes
- The types of the invocation's value arguments.typeargtypes
- The types of the invocation's type arguments.public Symbol.MethodSymbol resolveInternalConstructor(JCDiagnostic.DiagnosticPosition pos, Env<AttrContext> env, Type site, List<Type> argtypes, List<Type> typeargtypes)
pos
- The position to use for error reporting.env
- The environment current at the method invocation.site
- The type to be constructed.argtypes
- The types of the invocation's value arguments.typeargtypes
- The types of the invocation's type arguments.public void logAccessErrorInternal(Env<AttrContext> env, JCTree tree, Type type)
Copyright © 2015. All rights reserved.