001 /***************************************************************************** 002 * Copyright (C) NanoContainer Organization. All rights reserved. * 003 * ------------------------------------------------------------------------- * 004 * The software in this package is published under the terms of the BSD * 005 * style license a copy of which has been included with this distribution in * 006 * the LICENSE.txt file. * 007 * * 008 * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant * 009 *****************************************************************************/ 010 011 package org.nanocontainer.testmodel; 012 013 014 public class FredImpl { 015 Wilma wilma; 016 017 public FredImpl(Wilma wilma) { 018 this.wilma = wilma; 019 if (wilma == null) { 020 throw new NullPointerException("Wilma cannot be passed in as null"); 021 } 022 wilma.hello(); 023 } 024 025 public Wilma wilma() { 026 return wilma; 027 } 028 }