Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Why does Java argue about making a class instance Date: Mon, 28 Mar 2016 18:30:02 -0400 Organization: A noiseless patient Spider Lines: 13 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 28 Mar 2016 22:26:55 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="6790"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KfRyfO94UEgAnJdyCi7Yw" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 In-Reply-To: Cancel-Lock: sha1:TSLxwTmMj4Sz0A/+7WqvRA3SB88= Xref: csiph.com comp.lang.java.programmer:34049 On 3/28/2016 6:17 PM, FredK wrote: > I don't see why CollectVarsVisitor is even written as an inner class - it does not seem to reference anything in the Main class. Perhaps it should just be a separate class of its own. It looked to me like it should probably become a static nested class instead of an inner class. If so, it could do just as well as an entirely separate top-level class -- but it's so short that the bother of managing an additional file might not be worth it. It'd be okay either way, though. -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM