public static class BrooklynYamlTypeInstantiator.InstantiatorFromKey extends BrooklynYamlTypeInstantiator
BrooklynYamlTypeInstantiator.Factory, BrooklynYamlTypeInstantiator.InstantiatorFromKey, BrooklynYamlTypeInstantiator.InstantiatorFromName
Modifier and Type | Method and Description |
---|---|
static Maybe<java.lang.String> |
extractTypeName(java.lang.String prefix,
ConfigBag data) |
java.util.Map<java.lang.String,?> |
getConfigMap()
finds the map of config for the type specified;
currently only gets
brooklyn.config , returning empty map if none,
but TODO in future should support recognized flags and config keys (those declared on the type),
incorporating code in BrooklynEntityMatcher . |
Maybe<java.lang.String> |
getTypeName() |
java.lang.Object |
newInstance()
as
newInstance(Class) but inferring the type |
<T> T |
newInstance(java.lang.Class<T> supertype)
creates a new instance of the type referred to by this description,
as a subtype of the type supplied here,
inferring a Map from
brooklyn.config key. |
BrooklynYamlTypeInstantiator.InstantiatorFromKey |
prefix(java.lang.String prefix) |
getClassLoadingContext, getType, getType
public static Maybe<java.lang.String> extractTypeName(java.lang.String prefix, ConfigBag data)
public BrooklynYamlTypeInstantiator.InstantiatorFromKey prefix(java.lang.String prefix)
public Maybe<java.lang.String> getTypeName()
getTypeName
in class BrooklynYamlTypeInstantiator
public java.lang.Object newInstance()
newInstance(Class)
but inferring the typepublic <T> T newInstance(@Nullable java.lang.Class<T> supertype)
brooklyn.config
key.
TODO in future also picking up recognized flags and config keys (those declared on the type).
constructs the object using:
@Nonnull public java.util.Map<java.lang.String,?> getConfigMap()
brooklyn.config
, returning empty map if none,
but TODO in future should support recognized flags and config keys (those declared on the type),
incorporating code in BrooklynEntityMatcher
.