Table of Contents

Class JvmPackage

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

A JVM package, e.g. net.typedrest.endpoints.generic.

public sealed class JvmPackage : IEquatable<JvmPackage>
Inheritance
object
JvmPackage
Implements

Constructors

JvmPackage(string, bool)

Creates a package from a dotted name.

public JvmPackage(string name, bool generated = false)

Parameters

name string

The dotted package name. May be empty for the default package.

generated bool

Whether this package is generated by this tool rather than coming from a library.

Properties

Directory

The directory this package's files go in, relative to the source root, using / as the separator.

public string Directory { get; }

Property Value

string

Generated

Indicates whether this package holds types generated by this tool, as opposed to library types.

public bool Generated { get; }

Property Value

bool

Name

The dotted package name. Empty for the default package.

public string Name { get; }

Property Value

string

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(JvmPackage?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(JvmPackage? other)

Parameters

other JvmPackage

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

External(string)

A package belonging to the TypedRest runtime library or the JDK.

public static JvmPackage External(string name)

Parameters

name string

Returns

JvmPackage

FilePath(string, string)

The path of a file holding typeName in this package, including the extension.

public string FilePath(string typeName, string extension)

Parameters

typeName string
extension string

Returns

string

ForGenerated(string)

A package holding types generated by this tool.

public static JvmPackage ForGenerated(string name)

Parameters

name string

Returns

JvmPackage

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Sanitize(string?)

Turns a namespace-style value such as MyCompany.MyService into a valid package name.

public static string Sanitize(string? value)

Parameters

value string

Returns

string

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.