Table of Contents

Class JvmIdentifier

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

A reference to a JVM type.

public sealed class JvmIdentifier
Inheritance
object
JvmIdentifier

Constructors

JvmIdentifier(JvmPackage?, string, bool)

Creates a new type reference.

public JvmIdentifier(JvmPackage? package, string name, bool nullable = false)

Parameters

package JvmPackage

The package the type lives in, or null for a primitive/built-in.

name string

The simple name of the type.

nullable bool

Indicates whether the type can have the value null.

Properties

Boolean

The boxed java.lang.Boolean type.

public static JvmIdentifier Boolean { get; }

Property Value

JvmIdentifier

Double

The boxed java.lang.Double type.

public static JvmIdentifier Double { get; }

Property Value

JvmIdentifier

InputStream

The java.io.InputStream type, used for blob and upload endpoints.

public static JvmIdentifier InputStream { get; }

Property Value

JvmIdentifier

Int

The boxed java.lang.Integer type.

public static JvmIdentifier Int { get; }

Property Value

JvmIdentifier

Interface

The interface this type implements, or null if it implements none.

public JvmIdentifier? Interface { get; }

Property Value

JvmIdentifier

InterfaceName

The simple name of the interface this type implements, or null if it implements none.

public string? InterfaceName { get; }

Property Value

string

Remarks

The interface lives in the same package and takes the same type arguments.

Kind

What kind of type this is, for the cases the writers have to treat specially.

public JvmTypeKind Kind { get; }

Property Value

JvmTypeKind

LocalDate

The java.time.LocalDate type, used for date formats.

public static JvmIdentifier LocalDate { get; }

Property Value

JvmIdentifier

Long

The boxed java.lang.Long type.

public static JvmIdentifier Long { get; }

Property Value

JvmIdentifier

Name

The simple name of the type, without the package.

public string Name { get; }

Property Value

string

Nullable

Indicates whether the type can have the value null.

public bool Nullable { get; }

Property Value

bool

Object

The fallback for schemas that carry no usable type information.

public static JvmIdentifier Object { get; }

Property Value

JvmIdentifier

OffsetDateTime

The java.time.OffsetDateTime type, used for date-time formats.

public static JvmIdentifier OffsetDateTime { get; }

Property Value

JvmIdentifier

Package

The package the type lives in, or null for a primitive/built-in.

public JvmPackage? Package { get; }

Property Value

JvmPackage

QualifiedName

The fully qualified name, e.g. java.util.List.

public string QualifiedName { get; }

Property Value

string

String

The java.lang.String type.

public static JvmIdentifier String { get; }

Property Value

JvmIdentifier

TypeArguments

Generic type arguments for the type.

public List<JvmIdentifier> TypeArguments { get; }

Property Value

List<JvmIdentifier>

Uri

The java.net.URI type, which every endpoint constructor takes.

public static JvmIdentifier Uri { get; }

Property Value

JvmIdentifier

Uuid

The java.util.UUID type, used for uuid formats.

public static JvmIdentifier Uuid { get; }

Property Value

JvmIdentifier

Methods

GetImports()

Returns every type that has to be imported to reference this type.

public IEnumerable<JvmIdentifier> GetImports()

Returns

IEnumerable<JvmIdentifier>

Implementing(string)

Returns a copy of the type reference that implements the interface name.

public JvmIdentifier Implementing(string name)

Parameters

name string

Returns

JvmIdentifier

ListOf(JvmIdentifier)

A java.util.List of item.

public static JvmIdentifier ListOf(JvmIdentifier item)

Parameters

item JvmIdentifier

Returns

JvmIdentifier

MapOf(JvmIdentifier)

A java.util.Map from String to value.

public static JvmIdentifier MapOf(JvmIdentifier value)

Parameters

value JvmIdentifier

Returns

JvmIdentifier

ToNonNullable()

Returns a copy of the type reference that cannot have the value null.

public JvmIdentifier ToNonNullable()

Returns

JvmIdentifier

ToNullable()

Returns a copy of the type reference that can have the value null.

public JvmIdentifier ToNullable()

Returns

JvmIdentifier

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WithName(string)

Returns a copy of the type reference under a different name, keeping its package and type arguments.

public JvmIdentifier WithName(string name)

Parameters

name string

Returns

JvmIdentifier

WithTypeArguments(params JvmIdentifier[])

Returns a copy of the type reference with typeArguments applied.

public JvmIdentifier WithTypeArguments(params JvmIdentifier[] typeArguments)

Parameters

typeArguments JvmIdentifier[]

Returns

JvmIdentifier