Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Really "BIG" class name wanted Date: Sun, 31 Jul 2011 20:32:11 -0700 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <37e4697b-5aab-42ef-a1e5-3ce5a6d866a8@e15g2000yqd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 1 Aug 2011 03:32:16 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="26853"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/s34aL+8Qy0meLpWo7HKHn8NB+ao2gxp0=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <37e4697b-5aab-42ef-a1e5-3ce5a6d866a8@e15g2000yqd.googlegroups.com> Cancel-Lock: sha1:QwzqZXexxXHn+2zcO82gupwCUpk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6708 On 7/28/2011 3:20 AM, Ross wrote: > I'm now building a centralised class for a whole lot of important > functions in a program I'm writing. Here's an example of a similar thing: That's the Processing Environment for the Java compiler annotation processor. Notice it's got some things similar to your idea -- getOptions, getTypeUtils, some other stuff like getFiler (the file system, i.e., persistence) and some stuff specific to the problem domain (ElementUtils, Messager, etc.) Notice too it's not a "god object" -- it's only got a few objects contained with in it. It doesn't know everything, just the top level interfaces. That's much closer to what I think of as an ApplicationContext -- half a dozen to a dozen getters max, and only deals with well scoped top level concepts.