Skip to content

Commit

Permalink
[MCOMPILER-402] Add implicitOption to CompilerConfiguration (#202)
Browse files Browse the repository at this point in the history
Co-authored-by: Piotrek Żygieło <[email protected]>
  • Loading branch information
pzygielo and pzygielo authored Mar 16, 2022
1 parent f1a5a2b commit 13161ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ public class CompilerConfiguration
*/
private boolean enablePreview;

/** value of <code>-implicit:</code> of java compiler */
private String implicitOption;

// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -799,4 +802,14 @@ public void setForceJavacCompilerUse( boolean forceJavacCompilerUse )
{
this.forceJavacCompilerUse = forceJavacCompilerUse;
}

public String getImplicitOption()
{
return implicitOption;
}

public void setImplicitOption( String implicitOption )
{
this.implicitOption = implicitOption;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ public static String[] buildCompilerArguments( CompilerConfiguration config, Str
args.add( "--enable-preview" );
}

if ( config.getImplicitOption() != null )
{
args.add( "-implicit:" + config.getImplicitOption() );
}

if ( config.isShowDeprecation() )
{
args.add( "-deprecation" );
Expand Down

0 comments on commit 13161ad

Please sign in to comment.