Package com.google.gerrit.server
Class PropertyMap
java.lang.Object
com.google.gerrit.server.PropertyMap
Immutable map that holds a collection of random objects allowing for a type-safe retrieval.
Intended to be used in CurrentUser
when the object is constructed during login and
holds per-request state. This functionality allows plugins/extensions to contribute specific data
to CurrentUser
that is unknown to Gerrit core.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyMap
Empty instance to be referenced once per JVM. -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyMap.Builder
builder()
Returns a newPropertyMap.Builder
instance.<T> Optional<T>
get
(PropertyMap.Key<T> key) Returns the requested value wrapped asOptional
.static <T> PropertyMap.Key<T>
key()
-
Field Details
-
EMPTY
Empty instance to be referenced once per JVM.
-
-
Method Details
-
key
-
builder
Returns a newPropertyMap.Builder
instance. -
get
Returns the requested value wrapped asOptional
.
-