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
-
objectJvmAnnotation
Constructors
JvmAnnotation(JvmIdentifier)
An annotation on a generated type or member, e.g. @SerialName("first_name").
public JvmAnnotation(JvmIdentifier identifier)
Parameters
identifierJvmIdentifierThe type of the annotation.
Properties
Arguments
Positional arguments, written in order before any NamedArguments.
public List<string> Arguments { get; }
Property Value
Identifier
The type of the annotation.
public JvmIdentifier Identifier { get; }
Property Value
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
Methods
GetImports()
Returns every type that has to be imported to write this annotation.
public IEnumerable<JvmIdentifier> GetImports()
Returns
Write()
Writes the annotation, e.g. @JsonClass(generateAdapter = true).
public string Write()