eu.lindenbaum.maven.erlang
Class GetAttributesScript

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

public class GetAttributesScript
extends Object

A Script that returns the found values for some attributes in a list of modules.

Author:
Tobias Schlager , Olle Törnström

Field Summary
protected  String script
           
 
Fields inherited from interface eu.lindenbaum.maven.erlang.Script
NL
 
Constructor Summary
GetAttributesScript(List<File> modules, String... attributes)
          Returns the attribute values for attributes.
 
Method Summary
 String get()
          Returns an evaluateable String containing the erlang script of the implementing class.
 String handle(com.ericsson.otp.erlang.OtpErlangObject result)
          Converts the result of the Script execution into a String containing an erlang list of attribute values found.
 
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

GetAttributesScript

public GetAttributesScript(List<File> modules,
                           String... attributes)
                    throws org.apache.maven.plugin.MojoExecutionException
Returns the attribute values for attributes.

Parameters:
modules - to search for the attribute in
attributes - to look after
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 String handle(com.ericsson.otp.erlang.OtpErlangObject result)
Converts the result of the Script execution into a String containing an erlang list of attribute values found. Attribute values are expected to be atoms (or list of atoms).

Parameters:
result - to convert
Returns:
A list of modules, never null.


Copyright © 2012 Lindenbaum GmbH. All Rights Reserved.