> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# ByKey.ToInterface

> Parent of all generated ByKey classes within interfaces. These need to pass both the template and interface ID.

[Back to package](./index)

com.daml.ledger.javaapi.data.codegen

# ByKey.ToInterface

Parent of all generated ByKey classes within interfaces. These need to pass both the template and interface ID.

Java

Package
com.daml.ledger.javaapi.data.codegen

Upstream docs
[Open Javadoc](https://javadoc.io/doc/com.daml/bindings-java/3.7.5/com/daml/ledger/javaapi/data/codegen/ByKey.ToInterface.html)

## Signature

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
public abstract static class ByKey.ToInterface extends ByKey
```

## Members

| Member | Lifecycle | Upstream docs |
| - | - | - |
| `ToInterface(ContractCompanion<?, ?, ?>, Value)` | - | [Open](https://javadoc.io/doc/com.daml/bindings-java/3.7.5/com/daml/ledger/javaapi/data/codegen/ByKey.ToInterface.html#%3Cinit%3E%28com.daml.ledger.javaapi.data.codegen.ContractCompanion,com.daml.ledger.javaapi.data.Value%29) |
| `makeExerciseCmd(Choice<?, ? super A, R>, A)` | - | [Open](https://javadoc.io/doc/com.daml/bindings-java/3.7.5/com/daml/ledger/javaapi/data/codegen/ByKey.ToInterface.html#makeExerciseCmd%28com.daml.ledger.javaapi.data.codegen.Choice,A%29) |
