|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BrooklynCatalog
| Method Summary | ||
|---|---|---|
void |
addItem(CatalogItem<?> item)
adds an item to the 'manual' catalog; this does not update the classpath or have a record to the java Class, so callers of this method will typically also need to call addToClasspath(String) or addToClasspath(ClassLoader) |
|
CatalogItem<?> |
addItem(Class<?> clazz)
creates a catalog item and adds it to the 'manual' catalog, with the corresponding Class definition (loaded by a classloader) registered and available in the classloader. |
|
void |
addToClasspath(ClassLoader loader)
adds a classpath entry which will be used by the 'manual' catalog |
|
void |
addToClasspath(String url)
adds a classpath entry which will be used by the 'manual' catalog |
|
|
getCatalogItem(Class<T> type,
String id)
variant of getCatalogItem(String) which checks (and casts) type for convenience
(returns null if type does not match) |
|
CatalogItem<?> |
getCatalogItem(String id)
finds the item with the given ID, or null if not found |
|
|
getCatalogItems()
returns all items in the catalog |
|
|
getCatalogItems(com.google.common.base.Predicate<? super CatalogItem<T>> filter)
convenience for filtering items in the catalog; see CatalogPredicates for useful filters |
|
ClassLoader |
getRootClassLoader()
returns the classloader which should be used to load classes and entities; this includes all the catalog's classloaders in the right order |
|
|
loadClass(CatalogItem<T> item)
throws exceptions if any problems |
|
|
loadClassByType(String typeName,
Class<T> typeClass)
|
|
| Method Detail |
|---|
CatalogItem<?> getCatalogItem(String id)
<T> CatalogItem<T> getCatalogItem(Class<T> type,
String id)
getCatalogItem(String) which checks (and casts) type for convenience
(returns null if type does not match)
<T> Iterable<CatalogItem<T>> getCatalogItems()
<T> Iterable<CatalogItem<T>> getCatalogItems(com.google.common.base.Predicate<? super CatalogItem<T>> filter)
ClassLoader getRootClassLoader()
<T> Class<? extends T> loadClass(CatalogItem<T> item)
<T> Class<? extends T> loadClassByType(String typeName,
Class<T> typeClass)
void addItem(CatalogItem<?> item)
addToClasspath(String) or addToClasspath(ClassLoader)
CatalogItem<?> addItem(Class<?> clazz)
note that the class will be available for this session only, although the record of the item will appear in the catalog DTO if exported, so it is recommended to edit the 'manual' catalog DTO if using it to generate a catalog, either adding the appropriate classpath URL or removing this entry.
void addToClasspath(ClassLoader loader)
void addToClasspath(String url)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||