eu.lindenbaum.maven.erlang
Class LoadModulesScript

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

public final class LoadModulesScript
extends Object

A Script that loads a list of modules located in the current code paths. All modules will be purged before loading to prevent module version conflicts.

Author:
Tobias Schlager

Field Summary
protected  String script
           
 
Fields inherited from interface eu.lindenbaum.maven.erlang.Script
NL
 
Constructor Summary
LoadModulesScript(List<File> modules)
           
 
Method Summary
 String get()
          Returns an evaluateable String containing the erlang script of the implementing class.
 Integer handle(com.ericsson.otp.erlang.OtpErlangObject result)
          The result of the Script execution will be converted into an Integer indicating how many modules were actually loaded.
 
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

LoadModulesScript

public LoadModulesScript(List<File> modules)
                  throws org.apache.maven.plugin.MojoExecutionException
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 Integer handle(com.ericsson.otp.erlang.OtpErlangObject result)
The result of the Script execution will be converted into an Integer indicating how many modules were actually loaded.

Parameters:
result - The return term of the Script execution.
Returns:
The number of loaded modules, -1 on conversion errors.


Copyright © 2012 Lindenbaum GmbH. All Rights Reserved.