Lines Matching refs:env

212      * All other calls to 'getSuperClass(env)' appear in 'SourceClass'.
219 public ClassDeclaration getSuperClass(Environment env) {
504 * isAbstract(env)
506 public final boolean mustBeAbstract(Environment env) {
518 collectInheritedMethods(env);
539 public boolean superClassOf(Environment env, ClassDeclaration otherClass)
545 otherClass = otherClass.getClassDefinition(env).getSuperClass();
565 public boolean subClassOf(Environment env, ClassDeclaration otherClass) throws ClassNotFound {
571 c = c.getClassDefinition(env).getSuperClass();
579 public boolean implementedBy(Environment env, ClassDeclaration c) throws ClassNotFound {
580 for (; c != null ; c = c.getClassDefinition(env).getSuperClass()) {
584 ClassDeclaration intf[] = c.getClassDefinition(env).getInterfaces();
586 if (implementedBy(env, intf[i])) {
657 public boolean extendsCanAccess(Environment env, ClassDeclaration c) throws ClassNotFound {
662 return outerClass.canAccess(env, c);
667 ClassDefinition cdef = c.getClassDefinition(env);
706 public boolean canAccess(Environment env, ClassDeclaration c) throws ClassNotFound {
707 ClassDefinition cdef = c.getClassDefinition(env);
715 return canAccess(env, cdef.getInnerClassMember());
731 public boolean canAccess(Environment env, MemberDefinition f)
739 if (f.isProtected() && subClassOf(env, f.getClassDeclaration())) {
755 public boolean permitInlinedAccess(Environment env, ClassDeclaration c)
758 return (env.opt() && c.equals(declaration)) ||
759 (env.opt_interclass() && canAccess(env, c));
766 public boolean permitInlinedAccess(Environment env, MemberDefinition f)
768 return (env.opt()
770 (env.opt_interclass() && canAccess(env, f));
781 public boolean protectedAccess(Environment env, MemberDefinition f,
794 && env.getClassDefinition(accessorType.getClassName())
795 .subClassOf(env, getClassDeclaration()))
806 public MemberDefinition getAccessMember(Environment env, Context ctx,
815 public MemberDefinition getUpdateMember(Environment env, Context ctx,
831 public MemberDefinition getVariable(Environment env,
836 return getVariable0(env, nm, source, true, true);
846 private MemberDefinition getVariable0(Environment env,
875 sup.getClassDefinition(env)
876 .getVariable0(env, nm, source,
887 interfaces[i].getClassDefinition(env)
888 .getVariable0(env, nm, source, true, true);
894 source.canAccess(env, field) &&
908 public boolean reportDeprecated(Environment env) {
910 || (outerClass != null && outerClass.reportDeprecated(env)));
917 public void noteUsedBy(ClassDefinition ref, long where, Environment env) {
919 if (reportDeprecated(env)) {
920 env.error(where, "warn.class.is.deprecated", this);
935 public MemberDefinition getInnerClass(Environment env, Identifier nm)
965 // be resolved late -- see 'addMember(env,field)' below.
968 ClassDeclaration sup = getSuperClass(env);
970 return sup.getClassDefinition(env).getInnerClass(env, nm);
981 private MemberDefinition matchMethod(Environment env,
992 // collectInheritedMethods(env);
1009 if (!env.isApplicable(method, argumentTypes)) {
1015 if (!accessor.canAccess(env, method)) {
1039 if (env.isMoreSpecific(method, tentative)) {
1047 if (!env.isMoreSpecific(tentative,method)) {
1063 if (!env.isMoreSpecific(tentative, method)) {
1078 public MemberDefinition matchMethod(Environment env,
1084 return matchMethod(env, accessor, methodName,
1094 public MemberDefinition matchMethod(Environment env,
1099 return matchMethod(env, accessor, methodName,
1112 public MemberDefinition matchAnonConstructor(Environment env,
1117 return matchMethod(env, null, idInit, argumentTypes,
1129 public MemberDefinition findMethod(Environment env, Identifier nm, Type t)
1150 return sup.getClassDefinition(env).findMethod(env, nm, t);
1154 protected void basicCheck(Environment env) throws ClassNotFound {
1157 outerClass.basicCheck(env);
1163 public void check(Environment env) throws ClassNotFound {
1166 public Vset checkLocalClass(Environment env, Context ctx,
1232 private void collectOneClass(Environment env,
1241 ClassDefinition pClass = parent.getClassDefinition(env);
1242 Iterator methods = pClass.getMethods(env);
1290 env.error(method.getWhere(),
1319 override.checkOverride(env, method);
1348 env);
1376 if (!formerMethod.checkMeet(env,
1384 if (formerMethod.couldOverride(env, method)) {
1393 if (method.couldOverride(env, formerMethod)) {
1409 this,env);
1428 env.error(this.where,
1437 env.error(getWhere(), "class.not.found", ee.name, this);
1451 protected void collectInheritedMethods(Environment env) {
1475 if (env.version12()) {
1506 methodSetAdd(env, myMethods, member);
1507 methodSetAdd(env, allMethods, member);
1517 ClassDeclaration scDecl = getSuperClass(env);
1519 collectOneClass(env, scDecl,
1536 collectOneClass(env, interfaces[i],
1548 addMirandaMethods(env, mirandaMethods.iterator());
1565 private static void methodSetAdd(Environment env,
1575 if (env.isMoreSpecific(newReturnType, oldReturnType)) {
1590 public Iterator getMethods(Environment env) {
1592 collectInheritedMethods(env);
1638 protected void addMirandaMethods(Environment env,
1645 public void inlineLocalClass(Environment env) {
1654 public void resolveTypeStructure(Environment env) {
1661 * If no inner class is found, env.resolveName() is then called,
1689 public Identifier resolveName(Environment env, Identifier name) {
1690 if (tracing) env.dtEvent("ClassDefinition.resolveName: " + name);
1697 Identifier rhead = resolveName(env, name.getHead());
1707 if (!env.classExists(rhead)) {
1708 return env.resolvePackageQualifiedName(name);
1711 return env.getClassDefinition(rhead).
1712 resolveInnerClass(env, name.getTail());
1739 MemberDefinition f = c.getInnerClass(env, name);
1757 return env.resolveName(name);
1767 public Identifier resolveInnerClass(Environment env, Identifier nm) {
1770 Identifier rhead = resolveInnerClass(env, nm.getHead());
1772 return env.getClassDefinition(rhead).
1773 resolveInnerClass(env, nm.getTail());
1780 MemberDefinition f = getInnerClass(env, nm);
1819 public MemberDefinition findAnyMethod(Environment env, Identifier nm) throws ClassNotFound {
1831 return sup.getClassDefinition(env).findAnyMethod(env, nm);
1850 public int diagnoseMismatch(Environment env, Identifier nm, Type argTypes[],
1854 if (!diagnoseMismatch(env, nm, argTypes, start, haveMatch, margType))
1865 private boolean diagnoseMismatch(Environment env, Identifier nm, Type argTypes[], int start,
1880 if (env.implicitCast(at, ft)) {
1883 } else if (haveMatch[i] <= 2 && env.explicitCast(at, ft)) {
1905 if (sup.getClassDefinition(env).diagnoseMismatch(env, nm, argTypes, start,
1936 public void addMember(Environment env, MemberDefinition field) {
1940 field.resolveTypeStructure(env);
2075 public void cleanup(Environment env) {
2076 if (env.dump()) {
2077 env.output("[cleanup " + getName() + "]");
2080 f.cleanup(env);