public class RendererHints
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RendererHints.DisplayValue<T>
This hint describes a transformation used to generate a display value for config keys and sensors.
|
static class |
RendererHints.Hint<T>
Parent marker class for hints.
|
static interface |
RendererHints.NamedAction |
static class |
RendererHints.NamedActionWithUrl<T>
This hint describes a named action possible on something, e.g.
|
Constructor and Description |
---|
RendererHints() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
applyDisplayValueHint(AttributeSensor<?> target,
java.lang.Object initialValue)
Applies the (first) display value hint registered against the given target to the given initialValue
|
static java.lang.Object |
applyDisplayValueHint(java.lang.Class<?> target,
java.lang.Object initialValue)
|
static java.lang.Object |
applyDisplayValueHint(ConfigKey<?> target,
java.lang.Object initialValue)
|
static java.lang.Object |
applyDisplayValueHintUnchecked(java.lang.Object target,
java.lang.Object initialValue)
as
applyDisplayValueHint(AttributeSensor, Object) , but without type checking; public for those few cases where we may have lost the type |
static <T> RendererHints.DisplayValue<T> |
censoredValue()
Forces the given sensor or config key's value to be censored.
|
static <T> RendererHints.DisplayValue<T> |
displayValue(com.google.common.base.Function<T,java.lang.String> transform) |
static java.util.Set<RendererHints.Hint<?>> |
getHintsFor(AttributeSensor<?> element)
Returns all registered hints against the given element
|
static java.util.Set<RendererHints.Hint<?>> |
getHintsFor(java.lang.Class<?> element)
|
static java.util.Set<RendererHints.Hint<?>> |
getHintsFor(ConfigKey<?> element)
|
static java.util.Set<RendererHints.Hint<?>> |
getHintsFor(java.lang.Object element)
Deprecated.
|
static java.util.Set<RendererHints.Hint<?>> |
getHintsFor(java.lang.Object element,
java.lang.Class<? extends RendererHints.Hint> optionalHintSuperClass)
Deprecated.
|
static <T> RendererHints.NamedActionWithUrl<T> |
namedActionWithUrl() |
static <T> RendererHints.NamedActionWithUrl<T> |
namedActionWithUrl(com.google.common.base.Function<T,java.lang.String> transform) |
static <T> RendererHints.NamedActionWithUrl<T> |
namedActionWithUrl(java.lang.String actionName) |
static <T> RendererHints.NamedActionWithUrl<T> |
namedActionWithUrl(java.lang.String actionName,
com.google.common.base.Function<T,java.lang.String> transform) |
static <T> RendererHints.NamedActionWithUrl<T> |
openWithUrl() |
static <T> RendererHints.NamedActionWithUrl<T> |
openWithUrl(com.google.common.base.Function<T,java.lang.String> transform) |
static <T> AttributeSensor<T> |
register(AttributeSensor<T> element,
RendererHints.Hint<? super T> hintForThatElement)
Registers a
RendererHints.Hint against the given element. |
static <T> java.lang.Class<T> |
register(java.lang.Class<T> element,
RendererHints.Hint<? super T> hintForThatElement)
|
static <T> ConfigKey<T> |
register(ConfigKey<T> element,
RendererHints.Hint<? super T> hintForThatElement)
|
public static <T> AttributeSensor<T> register(AttributeSensor<T> element, RendererHints.Hint<? super T> hintForThatElement)
RendererHints.Hint
against the given element.
Returns the element, for convenience when used in a with block after defining the element.
public static <T> ConfigKey<T> register(ConfigKey<T> element, RendererHints.Hint<? super T> hintForThatElement)
public static <T> java.lang.Class<T> register(java.lang.Class<T> element, RendererHints.Hint<? super T> hintForThatElement)
public static java.util.Set<RendererHints.Hint<?>> getHintsFor(AttributeSensor<?> element)
public static java.util.Set<RendererHints.Hint<?>> getHintsFor(ConfigKey<?> element)
public static java.util.Set<RendererHints.Hint<?>> getHintsFor(java.lang.Class<?> element)
@Deprecated public static java.util.Set<RendererHints.Hint<?>> getHintsFor(java.lang.Object element)
@Deprecated public static java.util.Set<RendererHints.Hint<?>> getHintsFor(java.lang.Object element, java.lang.Class<? extends RendererHints.Hint> optionalHintSuperClass)
public static java.lang.Object applyDisplayValueHint(AttributeSensor<?> target, java.lang.Object initialValue)
public static java.lang.Object applyDisplayValueHint(ConfigKey<?> target, java.lang.Object initialValue)
public static java.lang.Object applyDisplayValueHint(java.lang.Class<?> target, java.lang.Object initialValue)
@Beta public static java.lang.Object applyDisplayValueHintUnchecked(java.lang.Object target, java.lang.Object initialValue)
applyDisplayValueHint(AttributeSensor, Object)
, but without type checking; public for those few cases where we may have lost the type@Beta public static <T> RendererHints.DisplayValue<T> displayValue(com.google.common.base.Function<T,java.lang.String> transform)
@Beta public static <T> RendererHints.NamedActionWithUrl<T> namedActionWithUrl(java.lang.String actionName, com.google.common.base.Function<T,java.lang.String> transform)
@Beta public static <T> RendererHints.NamedActionWithUrl<T> namedActionWithUrl(java.lang.String actionName)
@Beta public static <T> RendererHints.NamedActionWithUrl<T> namedActionWithUrl(com.google.common.base.Function<T,java.lang.String> transform)
@Beta public static <T> RendererHints.NamedActionWithUrl<T> namedActionWithUrl()
@Beta public static <T> RendererHints.NamedActionWithUrl<T> openWithUrl()
@Beta public static <T> RendererHints.NamedActionWithUrl<T> openWithUrl(com.google.common.base.Function<T,java.lang.String> transform)
@Beta public static <T> RendererHints.DisplayValue<T> censoredValue()
********
.