| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.lindenbaum.maven.util.ErlUtils
public final class ErlUtils
Containing utilities related to erlang code execution.
| Constructor Summary | |
|---|---|
ErlUtils()
 | 
|
| Method Summary | ||
|---|---|---|
static String | 
toApplicationTuples(org.apache.maven.artifact.Artifact... artifacts)
Returns a comma separated string of application version tuples taken from the given array of artifacts.  | 
|
static String | 
toApplicationTuples(CheckAppResult... applicationInfos)
Returns a comma separated string of application version tuples taken from the given array of CheckAppResults. | 
|
static String | 
toArtifactIdListing(Collection<org.apache.maven.artifact.Artifact> artifacts)
Generates a simple comma separated list of applications derived from the artifacts listed as dependencies.  | 
|
static String | 
toFilenameList(Collection<File> list,
               String prefix,
               String postfix)
Converts a Collection of file objects into a string containing a 
 valid erlang filename list. | 
|
static int | 
toInt(com.ericsson.otp.erlang.OtpErlangObject object)
Converts an OtpErlangInt or an OtpErlangUInt into an
 int using the object specific conversion function. | 
|
static
 | 
toList(Collection<T> list,
       Predicate<T> p,
       String prefix,
       String postfix)
Converts a Collection into a string containing a valid erlang list. | 
|
static
 | 
toList(T[] array,
       Predicate<T> p,
       String prefix,
       String postfix)
Converts an array into a string containing a valid erlang list.  | 
|
static String | 
toModuleList(Collection<File> list,
             String prefix,
             String postfix)
Converts a Collection of erlang source or beam files into a string
 containing a valid erlang list of module names. | 
|
static String | 
toString(com.ericsson.otp.erlang.OtpErlangObject object)
Converts an OtpErlangObject into a String using the object
 specific conversion function. | 
|
static String | 
toString(com.ericsson.otp.erlang.OtpErlangObject object,
         boolean trim)
Converts an OtpErlangObject into a String using the object
 specific conversion function. | 
|
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ErlUtils()
| Method Detail | 
|---|
public static <T> String toList(T[] array,
                                Predicate<T> p,
                                String prefix,
                                String postfix)
array - to convert, maybe nullp - optional predicat whether to include a specific list element,
          maybe nullprefix - to prepend to an entrypostfix - to append to an entry
public static <T> String toList(Collection<T> list,
                                Predicate<T> p,
                                String prefix,
                                String postfix)
Collection into a string containing a valid erlang list.
list - to convertp - optional predicat whether to include a specific list element,
          maybe nullprefix - to prepend to an entrypostfix - to append to an entry
public static String toFilenameList(Collection<File> list,
                                    String prefix,
                                    String postfix)
Collection of file objects into a string containing a 
 valid erlang filename list. The list of files will be converted using
 File.getAbsolutePath(). The file entries will be checked for 
 null and existence. The prefix and postfix Strings will be
 prepended/appended to every element of the list. This may be used to quote
 the returned paths correctly as erlang strings.
list - to convertprefix - to prepend to an entrypostfix - to append to an entry
public static String toModuleList(Collection<File> list,
                                  String prefix,
                                  String postfix)
Collection of erlang source or beam files into a string
 containing a valid erlang list of module names. The files will be checked
 for null and existence. The prefix and postfix Strings will
 be prepended/appended to every element of the list. This may be used to
 quote the module list correctly.
list - to convertprefix - to prepend to an entrypostfix - to append to an entry
public static String toString(com.ericsson.otp.erlang.OtpErlangObject object)
OtpErlangObject into a String using the object
 specific conversion function. If there is no specific string conversion
 function available the default OtpErlangObject.toString() is used.
 Empty OtpErlangLists will result in an empty String. The
 returned String will be trimmed.
object - to convert
String object
public static String toString(com.ericsson.otp.erlang.OtpErlangObject object,
                              boolean trim)
OtpErlangObject into a String using the object
 specific conversion function. If there is no specific string conversion
 function available the default OtpErlangObject.toString() is used.
 Empty OtpErlangLists will result in an empty String.
object - to converttrim - whether the returned string will be trimmed
String objectpublic static int toInt(com.ericsson.otp.erlang.OtpErlangObject object)
OtpErlangInt or an OtpErlangUInt into an
 int using the object specific conversion function. If the
 conversion can't be performed, or throws an error during conversion, the
 value 0 is always returned.
object - to convert
int value or 0 if unable to convertpublic static String toApplicationTuples(org.apache.maven.artifact.Artifact... artifacts)
{"app1", "version1"}, {"app2", "version2"}, ....
artifacts - to convert into application version tuples
null String objectpublic static String toApplicationTuples(CheckAppResult... applicationInfos)
CheckAppResults. Result string will look like
 {"app1", "version1"}, {"app2", "version2"}, ....
applicationInfos - to convert into application version tuples
null String objectpublic static String toArtifactIdListing(Collection<org.apache.maven.artifact.Artifact> artifacts)
ResourceGenerator.
artifacts - to convert into an artifactId listing
null String containing a valid erlang list
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||