> For the complete documentation index, see [llms.txt](https://ljtfreitas.gitbook.io/java-restify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ljtfreitas.gitbook.io/java-restify/anotacoes/extensions.md).

# Extensões

O processamento de anotações é realizado por implementações da interface `ContractReader`. A implementação padrão utiliza as anotações fornecidas pelo `java-restify`, mas existem extensões para outros conjuntos de anotações.

Caso deseje implementar algum suporte customizado para qualquer conjunto de anotações, basta criar sua própria implementação de `ContractReader` e utilizá-la na construção do `proxy`:

```java
import com.github.ljtfreitas.restify.http.contract.metadata.ContractReader;
import com.github.ljtfreitas.restify.http.contract.metadata.EndpointMethods;
import com.github.ljtfreitas.restify.http.contract.metadata.EndpointTarget;

class MyContractReader implements ContractReader {

    @Override
    public EndpointMethods read(EndpointTarget target) {
        /* 
        EndpointTarget fornece o tipo da interface e a url base utilizada na construção do proxy.

        EndpointMethods representa a coleção de métodos que serão utilizados para requisições.
        */
    }
}

MyApi myApi = new RestifyProxyBuilder()
  .contract(new MyContractReader())
  .target(MyApi.class)
    .build();
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ljtfreitas.gitbook.io/java-restify/anotacoes/extensions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
