How do I implement my own lookup or proxy another one?
Note: These pages are being reviewed.
It is not uncommon to be subclassing a class, such as TopComponent or Node which has a method
getLookup(), and to need to add to or filter the original Lookup’s contents. There are a number of convenience factories and classes which make it easy to do this:
ProxyLookup - a Lookup which takes an array of Lookups and merges them together. Typical use is taking an existing lookup and providing it plus a lookup created with one of the convenience methods below
Lookups.fixed(Object… arr) - a static method that creates a Lookup with an array of persistent objects as its contents
Lookups.singleton (Object single) - a static method that creates a Lookup with one object as its content
If you need to customize a Node’s lookup, read the FAQ item on how to do that.