T
- type of underlying elementpublic interface Pointer<T>
Elements are expected to stay valid within a single read action
.
It's highly advised to split long read actions into several short ones, but this also means
that some write action
might be run in between these short read actions,
which could potentially change the model of the element (reference model, PSI model, framework model or whatever model).
Modifier and Type | Method and Description |
---|---|
T |
dereference() |
boolean |
equals(java.lang.Object o) |
static <T> Pointer<T> |
hardPointer(T value)
Creates a pointer which holds strong reference to the
value . |
int |
hashCode() |
T dereference()
null
if the value was invalidated or cannot be restoredboolean equals(java.lang.Object o)
equals
in class java.lang.Object
int hashCode()
hashCode
in class java.lang.Object
static <T> Pointer<T> hardPointer(T value)
value
.
The pointer always dereferences into the passed value
.
Hard pointers should be used only for values that cannot be invalidated.