# Class MJavaInfo

java.lang.Object
com.io7m.montarre.api.MJavaInfo

All Implemented Interfaces:
  `MJavaInfoType`

public final class MJavaInfo extends Object implements MJavaInfoType
Information involving the Java runtime.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `MJavaInfo.Builder`
  Builds instances of type `MJavaInfo`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MJavaInfo.Builder`
  `builder()`
  Creates a builder for `MJavaInfo`.
  `static MJavaInfo`
  `copyOf(MJavaInfoType instance)`
  Creates an immutable copy of a `MJavaInfoType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `MJavaInfo` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `requiredJDKVersion`, `mainModule`.
  `String`
  `mainModule()`
  The fully-qualified main module name used as the application entrypoint.
  `long`
  `requiredJDKVersion()`
  `String`
  `toString()`
  Prints the immutable value `MJavaInfo` with attribute values.
  `final MJavaInfo`
  `withMainModule(String value)`
  Copy the current immutable object by setting a value for the `mainModule` attribute.
  `final MJavaInfo`
  `withRequiredJDKVersion(long value)`
  Copy the current immutable object by setting a value for the `requiredJDKVersion` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### requiredJDKVersion

    public long requiredJDKVersion()
    Specified by:
      `requiredJDKVersion` in interface `MJavaInfoType`
    Returns:
      The minimum required JDK version

  - ### mainModule

    public String mainModule()
    The fully-qualified main module name used as the application entrypoint. For example, "com.io7m.montarre.cmdline/com.io7m.montarre.cmdline.MMain".
    Specified by:
      `mainModule` in interface `MJavaInfoType`
    Returns:
      The fully-qualified main module

  - ### withRequiredJDKVersion

    public final MJavaInfo withRequiredJDKVersion(long value)
    Copy the current immutable object by setting a value for the `requiredJDKVersion` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for requiredJDKVersion
    Returns:
      A modified copy of the `this` object

  - ### withMainModule

    public final MJavaInfo withMainModule(String value)
    Copy the current immutable object by setting a value for the `mainModule` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for mainModule
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `MJavaInfo` that have equal attribute values.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `requiredJDKVersion`, `mainModule`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `MJavaInfo` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static MJavaInfo copyOf(MJavaInfoType instance)
    Creates an immutable copy of a `MJavaInfoType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable MJavaInfo instance

  - ### builder

    public static MJavaInfo.Builder builder()
    Creates a builder for `MJavaInfo`.

         MJavaInfo.builder()
            .setRequiredJDKVersion(long) // required requiredJDKVersion
            .setMainModule(String) // required mainModule
            .build();

    Returns:
      A new MJavaInfo builder