com.sun.hk2.component
Class CompanionSeed.Registerer
java.lang.Object
com.sun.hk2.component.CompanionSeed.Registerer
- All Implemented Interfaces:
- CageBuilder
- Enclosing class:
- CompanionSeed
public static final class CompanionSeed.Registerer
- extends java.lang.Object
- implements CageBuilder
When CompanionSeed
enters habitat, look
for existing inhabitants and make sure all of them
get its corresponding companions from this new seed.
Normal CageBuilder
s register themselves as components,
but this one is defined in HK2 so we have to get in by a special means.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompanionSeed.Registerer
public CompanionSeed.Registerer(Habitat habitat)
onEntered
public void onEntered(Inhabitant<?> i)
- Description copied from interface:
CageBuilder
- Called when an
Inhabitant
is entered into habitat.
- Specified by:
onEntered
in interface CageBuilder
createCompanion
public static LazyInhabitant createCompanion(Habitat habitat,
Inhabitant<?> lead,
Inhabitant<?> seed)
- Creates a companion inhabitant from the inhabitant of a
CompanionSeed
,
to be associated with a lead component.
Copyright © 2009 Sun Microsystems, Inc.. All Rights Reserved.