Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package apparat.embedding.maven;
  
  import scala.None$;
  import scala.Option;
  import scala.Some;
 import java.io.File;

Author(s):
Joa Ebert
Phase:
package
Goal:
reducer
ThreadSafe:
 
 public final class ReducerMojo extends AbstractApparatMojo {
The JPEG compression quality.

Parameter:
default-value="0.99f" expression="${apparat.reducer.quality}"
Required:
 
 	private float quality;

The strength of Flash Player's deblocking filter.

Parameter:
default-value="1.0f" expression="${apparat.reducer.deblock}"
Required:
 
 	private float deblock;

Whether or not to merge ABC files into a single one.

Parameter:
default-value="false" expression="${apparat.reducer.mergeABC}"
Required:
 
 	private boolean mergeABC;

Whether or not to sort the constant pool. Only if mergeABC is specified.

Parameter:
default-value="false" expression="${apparat.reducer.sortCPool}"
Required:
 
 	private boolean sortCPool;

Whether or not to use LZMA compression. Only available with SWF files.

Parameter:
default-value="false" expression="${apparat.reducer.lzma}"
Required:
 
 	private boolean lzma;

Which Matryoshka implementation to use. Either "quiet", "preloader" or "custom". When using "custom" you have to specify a custom Matryoshka via the matryoshka parameter.

Parameter:
default-value="quiet" expression="${apparat.reducer.matryoshkaType}"
Required:
 
 	private String matryoshkaType;

A custom Matryoshka. Only used if the matryoshkaType is set to "custom".

Parameter:
expression="${apparat.reducer.matryoshka}"
 
 	private File matryoshka;

Whether or not to merge control flow where possible.

Parameter:
default-value="quiet" expression="${apparat.reducer.mergeCF}"
 
 	private boolean mergeCF;
 
 	@Override protected void processFile(final File filethrows MojoFailureException {
 		if(getLog().isDebugEnabled()) {
 			getLog().debug("Running "+file+" through Reducer ...");
 		}
 
 			throw new MojoFailureException("\""++"\" is an illegal argument for the <matryoshkaType> node.");
 		}
 
 		final Reducer.ReducerTool tool = new Reducer.ReducerTool();
 		final ReducerConfiguration config = new ReducerConfiguration() {
 			@Override public File input() { return file; }
 			@Override public File output() { return file; }
 			@Override public float quality() { return ; }
 			@Override public float deblock() { return ; }
 			@Override public boolean mergeABC() { return ; }
			@Override public boolean sortCPool() { return ; }
			@Override public boolean lzma() { return ; }
			@Override public int matryoshkaType() {
					return MatryoshkaType.QUIET();
else if(.equalsIgnoreCase("preloader")) {
					return MatryoshkaType.PRELOADER();
else if(.equalsIgnoreCase("custom")) {
					return MatryoshkaType.CUSTOM();
else {
					return MatryoshkaType.NONE();
				}
			}
			@Override public Option<Filematryoshka() { return (null == ) ?
			@Override public boolean mergeCF() { return ; }
		};
		tool.configure(config);
		tool.run();
	}
New to GrepCode? Check out our FAQ X