Class MJavaInfo.Builder
java.lang.Object
com.io7m.montarre.api.MJavaInfo.Builder
- Enclosing class:
MJavaInfo
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newMJavaInfo.final MJavaInfo.Builderfrom(MJavaInfoType instance) Fill a builder with attribute values from the providedMJavaInfoTypeinstance.final MJavaInfo.BuildersetMainModule(String mainModule) Initializes the value for themainModuleattribute.final MJavaInfo.BuildersetRequiredJDKVersion(long requiredJDKVersion) Initializes the value for therequiredJDKVersionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMJavaInfoTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setRequiredJDKVersion
Initializes the value for therequiredJDKVersionattribute.- Parameters:
requiredJDKVersion- The value for requiredJDKVersion- Returns:
thisbuilder for use in a chained invocation
-
setMainModule
Initializes the value for themainModuleattribute.- Parameters:
mainModule- The value for mainModule- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMJavaInfo.- Returns:
- An immutable instance of MJavaInfo
- Throws:
IllegalStateException- if any required attributes are missing
-