Table of Contents

Interface IEndpointGenerator

Namespace
TypedRest.CodeGeneration.Jvm.Endpoints
Assembly
TypedRest.CodeGeneration.Jvm.dll

Drives the generation of code for a tree of IEndpoints.

public interface IEndpointGenerator

Properties

Log

Collects messages about aspects of the document the target language cannot express.

IGenerationLog Log { get; }

Property Value

IGenerationLog

Naming

Decides what the generated types and members are called.

INamingStrategy Naming { get; }

Property Value

INamingStrategy

WithInterfaces

Indicates whether an interface is generated alongside each generated endpoint class.

bool WithInterfaces { get; }

Property Value

bool

Remarks

When on, generated classes take the Impl suffix and the interface keeps the plain name. When off, the class keeps the plain name and no interface is generated.

Methods

EndpointType(string, IEndpoint)

Reserves a unique name for a generated endpoint class.

JvmIdentifier EndpointType(string key, IEndpoint endpoint)

Parameters

key string
endpoint IEndpoint

Returns

JvmIdentifier

Generate(string, IEndpoint)

Generates the member exposing an endpoint on its parent, plus any types needed for it.

(JvmChildEndpoint child, IEnumerable<IJvmType> types) Generate(string key, IEndpoint endpoint)

Parameters

key string
endpoint IEndpoint

Returns

(JvmChildEndpoint child, IEnumerable<IJvmType> types)

PopParent()

Records that generation has left the children of the most recently pushed endpoint.

void PopParent()

PushParent(string)

Records that generation has descended into the children of the endpoint with this key.

void PushParent(string key)

Parameters

key string