hudson.plugins.jabber.tools
Class MessageHelper
java.lang.Object
hudson.plugins.jabber.tools.MessageHelper
public class MessageHelper
- extends java.lang.Object
Utility class to help message creation
- Author:
- vsellier
|
Method Summary |
static
|
copyOfRange(U[] original,
int from,
int to,
java.lang.Class<? extends T[]> newType)
Unfortunately in Java 5 there is no Arrays.copyOfRange. |
static java.lang.String[] |
extractCommandLine(java.lang.String message)
|
static java.lang.String |
getBuildURL(hudson.model.AbstractBuild<?,?> lastBuild)
|
static java.lang.String |
getJoinedName(java.lang.String[] args,
int startIndex)
Extracts a name from an argument array starting at a start index and removing
quoting ". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageHelper
public MessageHelper()
getBuildURL
public static java.lang.String getBuildURL(hudson.model.AbstractBuild<?,?> lastBuild)
extractCommandLine
public static java.lang.String[] extractCommandLine(java.lang.String message)
copyOfRange
public static <T,U> T[] copyOfRange(U[] original,
int from,
int to,
java.lang.Class<? extends T[]> newType)
- Unfortunately in Java 5 there is no Arrays.copyOfRange.
So we have to implement it ourself.
getJoinedName
public static java.lang.String getJoinedName(java.lang.String[] args,
int startIndex)
- Extracts a name from an argument array starting at a start index and removing
quoting ".
- Parameters:
args - the argumentsstartIndex - the start index
- Returns:
- the job name as a single String
- Throws:
java.lang.IndexOutOfBoundsException - if startIndex > args length
Copyright © 2009. All Rights Reserved.