Class MJavaInfo
java.lang.Object
com.io7m.montarre.api.MJavaInfo
- All Implemented Interfaces:
MJavaInfoType
Information involving the Java runtime.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MJavaInfo.Builderbuilder()Creates a builder forMJavaInfo.static MJavaInfocopyOf(MJavaInfoType instance) Creates an immutable copy of aMJavaInfoTypevalue.booleanThis instance is equal to all instances ofMJavaInfothat have equal attribute values.inthashCode()Computes a hash code from attributes:requiredJDKVersion,mainModule,extraOptions,nativeAccessModules,runtimeImageKind.The fully-qualified main module name used as the application entrypoint.longtoString()Prints the immutable valueMJavaInfowith attribute values.final MJavaInfowithExtraOptions(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofextraOptions.final MJavaInfowithExtraOptions(String... elements) Copy the current immutable object with elements that replace the content ofextraOptions.final MJavaInfowithMainModule(String value) Copy the current immutable object by setting a value for themainModuleattribute.final MJavaInfowithNativeAccessModules(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofnativeAccessModules.final MJavaInfowithNativeAccessModules(String... elements) Copy the current immutable object with elements that replace the content ofnativeAccessModules.final MJavaInfowithRequiredJDKVersion(long value) Copy the current immutable object by setting a value for therequiredJDKVersionattribute.final MJavaInfoCopy the current immutable object by setting a value for theruntimeImageKindattribute.
-
Method Details
-
requiredJDKVersion
public long requiredJDKVersion()- Specified by:
requiredJDKVersionin interfaceMJavaInfoType- Returns:
- The minimum required JDK version
-
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:
mainModulein interfaceMJavaInfoType- Returns:
- The fully-qualified main module
-
extraOptions
- Specified by:
extraOptionsin interfaceMJavaInfoType- Returns:
- Extra options passed to the runtime
-
nativeAccessModules
- Specified by:
nativeAccessModulesin interfaceMJavaInfoType- Returns:
- The set of modules permitted to use native access
- See Also:
-
runtimeImageKind
- Specified by:
runtimeImageKindin interfaceMJavaInfoType- Returns:
- The required runtime image kind
-
withRequiredJDKVersion
Copy the current immutable object by setting a value for therequiredJDKVersionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for requiredJDKVersion- Returns:
- A modified copy or the
thisobject
-
withMainModule
Copy the current immutable object by setting a value for themainModuleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mainModule- Returns:
- A modified copy or the
thisobject
-
withExtraOptions
Copy the current immutable object with elements that replace the content ofextraOptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExtraOptions
Copy the current immutable object with elements that replace the content ofextraOptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of extraOptions elements to set- Returns:
- A modified copy or
thisif not changed
-
withNativeAccessModules
Copy the current immutable object with elements that replace the content ofnativeAccessModules.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNativeAccessModules
Copy the current immutable object with elements that replace the content ofnativeAccessModules. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of nativeAccessModules elements to set- Returns:
- A modified copy or
thisif not changed
-
withRuntimeImageKind
Copy the current immutable object by setting a value for theruntimeImageKindattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for runtimeImageKind- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aMJavaInfoTypevalue. 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
Creates a builder forMJavaInfo.MJavaInfo.builder() .setRequiredJDKVersion(long) // required
requiredJDKVersion.setMainModule(String) // requiredmainModule.addExtraOptions|addAllExtraOptions(String) //extraOptionselements .addNativeAccessModules|addAllNativeAccessModules(String) //nativeAccessModuleselements .setRuntimeImageKind(com.io7m.montarre.api.MRuntimeImageKind) // optionalruntimeImageKind.build();- Returns:
- A new MJavaInfo builder
-