Package com.strobel.componentmodel
Class UserDataStoreBase
- java.lang.Object
-
- com.strobel.componentmodel.UserDataStoreBase
-
- All Implemented Interfaces:
UserDataStore
,java.lang.Cloneable
- Direct Known Subclasses:
DecompilerContext
public class UserDataStoreBase extends java.lang.Object implements UserDataStore, java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description private FrugalKeyMap
_map
static Key<FrugalKeyMap>
COPYABLE_USER_MAP_KEY
private static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<UserDataStoreBase,FrugalKeyMap>
UPDATER
-
Constructor Summary
Constructors Constructor Description UserDataStoreBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserDataStoreBase
clone()
<T> T
getUserData(Key<T> key)
<T> void
putUserData(Key<T> key, T value)
<T> T
putUserDataIfAbsent(Key<T> key, T value)
<T> boolean
replace(Key<T> key, T oldValue, T newValue)
-
-
-
Field Detail
-
COPYABLE_USER_MAP_KEY
public static final Key<FrugalKeyMap> COPYABLE_USER_MAP_KEY
-
UPDATER
private static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<UserDataStoreBase,FrugalKeyMap> UPDATER
-
_map
@NotNull private volatile FrugalKeyMap _map
-
-
Method Detail
-
getUserData
public <T> T getUserData(@NotNull Key<T> key)
- Specified by:
getUserData
in interfaceUserDataStore
-
putUserData
public <T> void putUserData(@NotNull Key<T> key, @Nullable T value)
- Specified by:
putUserData
in interfaceUserDataStore
-
putUserDataIfAbsent
public <T> T putUserDataIfAbsent(@NotNull Key<T> key, @Nullable T value)
- Specified by:
putUserDataIfAbsent
in interfaceUserDataStore
-
replace
public <T> boolean replace(@NotNull Key<T> key, @Nullable T oldValue, @Nullable T newValue)
- Specified by:
replace
in interfaceUserDataStore
-
clone
public final UserDataStoreBase clone()
- Overrides:
clone
in classjava.lang.Object
-
-