public class BrooklynComponentTemplateResolver
extends java.lang.Object
PlatformComponentTemplate
instances whose type is prefixed brooklyn:
to Brooklyn EntitySpec
instances.
but TODO this should probably be done by BrooklynEntityMatcher
so we have a spec by the time we come to instantiate.
(currently privileges "brooklyn.*" key names are checked in both places!)
Modifier and Type | Class and Description |
---|---|
static class |
BrooklynComponentTemplateResolver.Factory |
Constructor and Description |
---|
BrooklynComponentTemplateResolver(BrooklynClassLoadingContext loader,
ConfigBag attrs,
AbstractResource optionalTemplate) |
Modifier and Type | Method and Description |
---|---|
boolean |
canResolve() |
CatalogItem<Entity,EntitySpec<?>> |
getCatalogItem()
Returns the CatalogItem if there is one for the given type;
(if no type, callers should fall back to default classloading)
|
java.lang.Class<? extends Entity> |
loadEntityClass()
returns the entity class, if needed in contexts which scan its statics for example
|
<T extends Entity> |
resolveSpec()
resolves the spec, updating the loader if a catalog item is loaded
|
Maybe<java.lang.Class<? extends Entity>> |
tryLoadEntityClass()
tries to load the Java entity class
|
public BrooklynComponentTemplateResolver(BrooklynClassLoadingContext loader, ConfigBag attrs, AbstractResource optionalTemplate)
@Nullable public CatalogItem<Entity,EntitySpec<?>> getCatalogItem()
public boolean canResolve()
public java.lang.Class<? extends Entity> loadEntityClass()
public Maybe<java.lang.Class<? extends Entity>> tryLoadEntityClass()
public <T extends Entity> EntitySpec<T> resolveSpec()