Skip to content

Commit

Permalink
Cleanups to JlinkOptions, JmodOptions and JpackageOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Aug 26, 2024
1 parent 22add23 commit b8a63dd
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 104 deletions.
12 changes: 4 additions & 8 deletions src/main/java/rife/bld/operations/JlinkOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ public JlinkOptions modulePath(String path) {
* @return this map of options
*/
public JlinkOptions modulePath(File path) {
put("--module-path", path.getAbsolutePath());
return this;
return modulePath(path.getAbsolutePath());
}

/**
Expand All @@ -187,8 +186,7 @@ public JlinkOptions modulePath(File path) {
* @return this map of options
*/
public JlinkOptions modulePath(Path path) {
put("--module-path", path.toFile().getAbsolutePath());
return this;
return modulePath(path.toFile());
}

/**
Expand Down Expand Up @@ -239,8 +237,7 @@ public JlinkOptions output(String path) {
* @return this map of options
*/
public JlinkOptions output(File path) {
put("--output", path.getAbsolutePath());
return this;
return output(path.getAbsolutePath());
}

/**
Expand All @@ -250,8 +247,7 @@ public JlinkOptions output(File path) {
* @return this map of options
*/
public JlinkOptions output(Path path) {
put("--output", path.toFile().getAbsolutePath());
return this;
return output(path.toFile());
}

/**
Expand Down
48 changes: 16 additions & 32 deletions src/main/java/rife/bld/operations/JmodOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public JmodOptions cmds(String path) {
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions cmds(File path) {
put("--cmds", path.getAbsolutePath());
return this;
return cmds(path.getAbsolutePath());
}

/**
Expand All @@ -60,8 +59,7 @@ public JmodOptions cmds(File path) {
* @return this map of options
*/
public JmodOptions cmds(Path path) {
put("--cmds", path.toFile().getAbsolutePath());
return this;
return cmds(path.toFile());
}

/**
Expand Down Expand Up @@ -101,8 +99,7 @@ public JmodOptions config(String path) {
* @return this map of options
*/
public JmodOptions config(File path) {
put("--config", path.getAbsolutePath());
return this;
return config(path.getAbsolutePath());
}

/**
Expand All @@ -112,8 +109,7 @@ public JmodOptions config(File path) {
* @return this map of options
*/
public JmodOptions config(Path path) {
put("--config", path.toFile().getAbsolutePath());
return this;
return config(path.toFile());
}

/**
Expand Down Expand Up @@ -145,8 +141,7 @@ public JmodOptions dir(String path) {
* @return this map of options
*/
public JmodOptions dir(File path) {
put("--dir", path.getAbsolutePath());
return this;
return dir(path.getAbsolutePath());
}

/**
Expand All @@ -156,8 +151,7 @@ public JmodOptions dir(File path) {
* @return this map of options
*/
public JmodOptions dir(Path path) {
put("--dir", path.toFile().getAbsolutePath());
return this;
return dir(path.toFile());
}

/**
Expand Down Expand Up @@ -241,8 +235,7 @@ public JmodOptions headerFiles(String path) {
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions headerFiles(File path) {
put("--header-files", path.getAbsolutePath());
return this;
return headerFiles(path.getAbsolutePath());
}

/**
Expand All @@ -252,8 +245,7 @@ public JmodOptions headerFiles(File path) {
* @return this map of options
*/
public JmodOptions headerFiles(Path path) {
put("--header-files", path.toFile().getAbsolutePath());
return this;
return headerFiles(path.toFile());
}

/**
Expand All @@ -275,8 +267,7 @@ public JmodOptions legalNotices(String path) {
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions legalNotices(File path) {
put("--legal-notices", path.getAbsolutePath());
return this;
return legalNotices(path.getAbsolutePath());
}

/**
Expand All @@ -286,8 +277,7 @@ public JmodOptions legalNotices(File path) {
* @return this map of options
*/
public JmodOptions legalNotices(Path path) {
put("--legal-notices", path.toFile().getAbsolutePath());
return this;
return legalNotices(path.toFile());
}

/**
Expand All @@ -309,8 +299,7 @@ public JmodOptions libs(String path) {
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions libs(File path) {
put("--libs", path.getAbsolutePath());
return this;
return libs(path.getAbsolutePath());
}

/**
Expand All @@ -320,8 +309,7 @@ public JmodOptions libs(File path) {
* @return this map of options
*/
public JmodOptions libs(Path path) {
put("--libs", path.toFile().getAbsolutePath());
return this;
return libs(path.toFile());
}

/**
Expand Down Expand Up @@ -354,8 +342,7 @@ public JmodOptions manPages(String path) {
*/
@SuppressWarnings("UnusedReturnValue")
public JmodOptions manPages(File path) {
put("--man-pages", path.getAbsolutePath());
return this;
return manPages(path.getAbsolutePath());
}

/**
Expand All @@ -365,8 +352,7 @@ public JmodOptions manPages(File path) {
* @return this map of options
*/
public JmodOptions manPages(Path path) {
put("--man-pages", path.toFile().getAbsolutePath());
return this;
return manPages(path.toFile());
}

/**
Expand All @@ -387,8 +373,7 @@ public JmodOptions modulePath(String path) {
* @return this map of options
*/
public JmodOptions modulePath(File path) {
put("--module-path", path.getAbsolutePath());
return this;
return modulePath(path.getAbsolutePath());
}

/**
Expand All @@ -398,8 +383,7 @@ public JmodOptions modulePath(File path) {
* @return this map of options
*/
public JmodOptions modulePath(Path path) {
put("--module-path", path.toFile().getAbsolutePath());
return this;
return modulePath(path.toFile());
}

/**
Expand Down
Loading

0 comments on commit b8a63dd

Please sign in to comment.