author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:53:43 +0200 | |
changeset 82 | d098b8e4de15 |
permissions | -rw-r--r-- |
jtulach@82 | 1 |
package org.apidesign.component; |
jtulach@82 | 2 |
|
jtulach@82 | 3 |
import java.util.Collection; |
jtulach@82 | 4 |
import org.openide.util.Lookup; |
jtulach@82 | 5 |
|
jtulach@82 | 6 |
// BEGIN: lookup.define.slot |
jtulach@82 | 7 |
public class InjectionSlot { |
jtulach@82 | 8 |
public static InjectionSlot singleSlot() { |
jtulach@82 | 9 |
// get one implementation |
jtulach@82 | 10 |
return Lookup.getDefault().lookup(InjectionSlot.class); |
jtulach@82 | 11 |
} |
jtulach@82 | 12 |
|
jtulach@82 | 13 |
public static Collection<? extends InjectionSlot> multiSlot() { |
jtulach@82 | 14 |
// get all registered implementations |
jtulach@82 | 15 |
return Lookup.getDefault().lookupAll(InjectionSlot.class); |
jtulach@82 | 16 |
} |
jtulach@82 | 17 |
} |
jtulach@82 | 18 |
// END: lookup.define.slot |