eu.lindenbaum.maven.erlang
Class MibCompilerScript

java.lang.Object
  extended by eu.lindenbaum.maven.erlang.MibCompilerScript
All Implemented Interfaces:
Script<CompilerResult>

public final class MibCompilerScript
extends Object

A Script that can be used to compile MIB files.

Since:
2.2.0
Author:
Olle Törnström

Field Summary
protected  String script
           
 
Fields inherited from interface eu.lindenbaum.maven.erlang.Script
NL
 
Constructor Summary
MibCompilerScript(List<File> files, File outdir, List<File> includes)
          Creates a compiler script for a List of MIB files.
 
Method Summary
 String get()
          Returns an evaluateable String containing the erlang script of the implementing class.
 CompilerResult handle(com.ericsson.otp.erlang.OtpErlangObject result)
          Converts the result of the Script execution into an object logging the compiler output correctly as well as providing failed compilation units, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

script

protected final String script
Constructor Detail

MibCompilerScript

public MibCompilerScript(List<File> files,
                         File outdir,
                         List<File> includes)
                  throws org.apache.maven.plugin.MojoExecutionException
Creates a compiler script for a List of MIB files.

Parameters:
files - a list of the MIB files to compile
outdir - the destination directory for the compiled .bin MIBs
includes - a list of include directories
Throws:
org.apache.maven.plugin.MojoExecutionException
Method Detail

get

public String get()
Description copied from interface: Script
Returns an evaluateable String containing the erlang script of the implementing class.

Returns:
An erlang script that can be evaluated.

handle

public CompilerResult handle(com.ericsson.otp.erlang.OtpErlangObject result)
Converts the result of the Script execution into an object logging the compiler output correctly as well as providing failed compilation units, if any.

Parameters:
result - The return term of the Script execution.
Returns:
An object capable of delivering the results transparently.


Copyright © 2012 Lindenbaum GmbH. All Rights Reserved.