接口 UserDataHolder

所有已知子接口:
ASTNode, FileViewProvider, PsiBuilder, UserDataHolderEx
所有已知实现类:
FleetPsiBuilder, GeneratedParserUtilBase.Builder, IndentPsiBuilder, MarkerPsiBuilder, PsiBuilderAdapter, UnprotectedUserDataHolder

public interface UserDataHolder
Allows storing custom user data within a model object. This might be preferred to an explicit Map with model objects as keys and custom data in values because this allows the data to be garbage-collected together with the values.

If you need to implement this interface, extend UserDataHolderBase or delegate to its instance instead of writing your own implementation.

  • 方法概要

    修饰符和类型
    方法
    说明
    <T> T
    getUserData(@NotNull Key<T> key)
     
    <T> void
    putUserData(@NotNull Key<T> key, T value)
    Add a new user data value to this object.
  • 方法详细资料

    • getUserData

      @Nullable <T> T getUserData(@NotNull @NotNull Key<T> key)
      返回:
      a user data value associated with this object. Doesn't require read action.
    • putUserData

      <T> void putUserData(@NotNull @NotNull Key<T> key, @Nullable T value)
      Add a new user data value to this object. Doesn't require write action.