public class BasicSpecParameter<T> extends java.lang.Object implements SpecParameter<T>
Constructor and Description |
---|
BasicSpecParameter(java.lang.String label,
boolean pinned,
ConfigKey<T> config) |
BasicSpecParameter(java.lang.String label,
boolean pinned,
ConfigKey<T> config,
AttributeSensor<SensorType> sensor) |
Modifier and Type | Method and Description |
---|---|
static void |
addCustomTypeNameInference(java.lang.String ruleName,
java.util.function.BiFunction<java.lang.String,BrooklynClassLoadingContext,<any>> rule)
Allows extensions to define additional types that are supported for parameters in YAML.
|
boolean |
equals(java.lang.Object obj) |
static java.util.List<SpecParameter<?>> |
fromClass(ManagementContext mgmt,
java.lang.Class<?> type) |
static java.util.List<SpecParameter<?>> |
fromSpec(ManagementContext mgmt,
AbstractBrooklynObjectSpec<?,?> spec) |
ConfigKey<T> |
getConfigKey()
All config key info for this spec parameter;
this is the config key which is added to the defined type
|
java.lang.String |
getLabel()
Short name, to be used in UI
|
AttributeSensor<?> |
getSensor()
An optional sensor which may also be added to the defined type
|
int |
hashCode() |
static void |
initializeSpecWithExplicitParameters(AbstractBrooklynObjectSpec<?,?> spec,
java.util.List<? extends SpecParameter<?>> explicitParams,
BrooklynClassLoadingContext loader)
Adds the given list of
parameters to the provided
spec , and if spec has no parameters it
also generates a list from the spec |
boolean |
isPinned()
Whether visible by default in UI, not all inputs may be visible at once
|
static java.util.List<SpecParameter<?>> |
parseParameterDefinitionList(java.util.List<?> obj,
<any> specialFlagsTransformer,
BrooklynClassLoadingContext loader)
Returns a list of
SpecParameterIncludingDefinitionForInheritance objects from the given list;
these should be resolved against ancestors before using, converting that object to BasicSpecParameter instances. |
java.lang.String |
toString() |
public BasicSpecParameter(java.lang.String label, boolean pinned, ConfigKey<T> config)
public BasicSpecParameter(java.lang.String label, boolean pinned, ConfigKey<T> config, AttributeSensor<SensorType> sensor)
public java.lang.String getLabel()
SpecParameter
getLabel
in interface SpecParameter<T>
public boolean isPinned()
SpecParameter
isPinned
in interface SpecParameter<T>
public ConfigKey<T> getConfigKey()
SpecParameter
getConfigKey
in interface SpecParameter<T>
public AttributeSensor<?> getSensor()
SpecParameter
getSensor
in interface SpecParameter<T>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.List<SpecParameter<?>> parseParameterDefinitionList(java.util.List<?> obj, <any> specialFlagsTransformer, BrooklynClassLoadingContext loader)
SpecParameterIncludingDefinitionForInheritance
objects from the given list;
these should be resolved against ancestors before using, converting that object to BasicSpecParameter
instances.public static java.util.List<SpecParameter<?>> fromClass(ManagementContext mgmt, java.lang.Class<?> type)
public static java.util.List<SpecParameter<?>> fromSpec(ManagementContext mgmt, AbstractBrooklynObjectSpec<?,?> spec)
public static void addCustomTypeNameInference(java.lang.String ruleName, java.util.function.BiFunction<java.lang.String,BrooklynClassLoadingContext,<any>> rule)
public static void initializeSpecWithExplicitParameters(AbstractBrooklynObjectSpec<?,?> spec, java.util.List<? extends SpecParameter<?>> explicitParams, BrooklynClassLoadingContext loader)
parameters
to the provided
spec
, and if spec has no parameters it
also generates a list from the specEntitySpec#parameters(List)