Table of Contents

Class JvmAnnotation

Namespace
TypedRest.CodeGeneration.Jvm.Model
Assembly
TypedRest.CodeGeneration.Jvm.dll

An annotation on a generated type or member, e.g. @SerialName("first_name").

public sealed class JvmAnnotation
Inheritance
object
JvmAnnotation

Constructors

JvmAnnotation(JvmIdentifier)

An annotation on a generated type or member, e.g. @SerialName("first_name").

public JvmAnnotation(JvmIdentifier identifier)

Parameters

identifier JvmIdentifier

The type of the annotation.

Properties

Arguments

Positional arguments, written in order before any NamedArguments.

public List<string> Arguments { get; }

Property Value

List<string>

Identifier

The type of the annotation.

public JvmIdentifier Identifier { get; }

Property Value

JvmIdentifier

NamedArguments

Named arguments. The value is written verbatim, so a string has to arrive already quoted.

public List<(string name, string value)> NamedArguments { get; }

Property Value

List<(string name, string value)>

Methods

GetImports()

Returns every type that has to be imported to write this annotation.

public IEnumerable<JvmIdentifier> GetImports()

Returns

IEnumerable<JvmIdentifier>

Write()

Writes the annotation, e.g. @JsonClass(generateAdapter = true).

public string Write()

Returns

string