StaticPointer.<init> - corda

corda / net.corda.core.contracts / StaticPointer / <init>

# <init>

`StaticPointer(pointer: StateRef, type: Class<T>)`

Allows this class to be evolved through backwards compatibility with version 1 of this class.

### Parameters

`pointer` - The state reference that this points to.

`type` - The underlying LinearState type that this points to.

`StaticPointer(pointer: StateRef, type: Class<T>, isResolved: Boolean = false)`

A StaticPointer contains a pointer to a specific StateRef and can be resolved by looking up the StateRef via ServiceHub. There are a number of things to keep in mind when using StaticPointers:

- The ContractState being pointed to may be spent or unspent when the pointer is resolved
- The ContractState may not be known by the node performing the look-up in which case the resolve method will throw a TransactionResolutionException