01: /*****************************************************************************
02: * Copyright (C) NanoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: * *
08: * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant *
09: *****************************************************************************/package org.nanocontainer.testmodel;
10:
11: public class FredImpl {
12: Wilma wilma;
13:
14: public FredImpl(Wilma wilma) {
15: this .wilma = wilma;
16: if (wilma == null) {
17: throw new NullPointerException(
18: "Wilma cannot be passed in as null");
19: }
20: wilma.hello();
21: }
22:
23: public Wilma wilma() {
24: return wilma;
25: }
26: }
|