Table of Contents

Class JavaWriter

Namespace
TypedRest.CodeGeneration.Java
Assembly
TypedRest.CodeGeneration.Java.dll

Renders the shared JVM type model as Java source code.

public sealed class JavaWriter
Inheritance
object
JavaWriter

Constructors

JavaWriter(JvmSerializer, bool, bool)

Renders the shared JVM type model as Java source code.

public JavaWriter(JvmSerializer serializer, bool entryConstructor = true, bool nullableAnnotations = true)

Parameters

serializer JvmSerializer

Supplies the annotations carrying wire names on generated DTOs.

entryConstructor bool

Controls whether the entry endpoint gets a generated constructor.

nullableAnnotations bool

Controls whether properties are annotated with JSpecify nullability.

Fields

FileExtension

The file extension of Java source files.

public const string FileExtension = ".java"

Field Value

string

Methods

Expression(JvmExpression)

Writes an expression.

public string Expression(JvmExpression expression)

Parameters

expression JvmExpression

Returns

string

TypeExpression(JvmIdentifier)

Writes a type reference, e.g. List<Contact>.

public string TypeExpression(JvmIdentifier identifier)

Parameters

identifier JvmIdentifier

Returns

string

WriteFile(TextWriter, IJvmType)

Writes a file declaring type.

public void WriteFile(TextWriter textWriter, IJvmType type)

Parameters

textWriter TextWriter
type IJvmType