public class ComponentKeyUtils
extends java.lang.Object
Constructor and Description |
---|
ComponentKeyUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
generateGlobalKey(ComponentContext parentContext,
Component parentComponent,
Component childComponent)
Generate a global key for the given component that is unique among all of this component's
children of the same type.
|
static java.lang.String |
getKeyForChildPosition(java.lang.String currentKey,
int index) |
static java.lang.String |
getKeyWithSeparator(java.lang.Object... keyParts) |
static java.lang.String |
getKeyWithSeparator(java.lang.String parentGlobalKey,
java.lang.String key) |
static java.lang.String |
getKeyWithSeparatorForTest(java.lang.Object... keyParts) |
static java.lang.String |
mapToSimpleName(java.lang.String key,
java.util.Map<java.lang.Object,java.lang.Integer> typeToIdMap) |
public static java.lang.String getKeyWithSeparator(java.lang.Object... keyParts)
keyParts
- a list of objects that will be concatenated to form another component's keypublic static java.lang.String getKeyWithSeparator(java.lang.String parentGlobalKey, java.lang.String key)
public static java.lang.String getKeyForChildPosition(java.lang.String currentKey, int index)
public static java.lang.String generateGlobalKey(ComponentContext parentContext, Component parentComponent, Component childComponent)
TODO: (T38237241) remove the usage of the key handler post the nested tree experiment
parentComponent
- parent component within the layout contextchildComponent
- child component with the parent contextpublic static java.lang.String getKeyWithSeparatorForTest(java.lang.Object... keyParts)
public static java.lang.String mapToSimpleName(java.lang.String key, java.util.Map<java.lang.Object,java.lang.Integer> typeToIdMap)