@@ -0,0 +1,3139 @@
+/*%0A * The MIT License (MIT)%0A *%0A * Copyright (c) 2015 Lachlan Dowding%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in all%0A * copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0A * SOFTWARE.%0A */%0A%0Apackage permafrost.tundra.lang;%0A%0Aimport com.wm.data.IData;%0Aimport com.wm.data.IDataCursor;%0Aimport com.wm.data.IDataFactory;%0Aimport com.wm.data.IDataUtil;%0A%0A/**%0A * A collection of convenience methods for working with StackTraceElement objects.%0A */%0Apublic class StackTraceElementHelper %7B%0A    /**%0A     * Disallow instantiation of this class.%0A     */%0A    private StackTraceElementHelper() %7B%7D%0A%0A    /**%0A     * Converts a StackTraceElement%5B%5D to an IData%5B%5D representation.%0A     *%0A     * @param array The StackTraceElement%5B%5D to be converted.%0A     * @return      The IData%5B%5D representation of the given StackTraceElement%5B%5D.%0A     */%0A    public static IData%5B%5D toIDataArray(StackTraceElement%5B%5D array) %7B%0A        if (array == null) return null;%0A%0A        IData%5B%5D output = new IData%5Barray.length%5D;%0A%0A        for (int i = 0; i %3C array.length; i++) %7B%0A            output%5Bi%5D = toIData(array%5Bi%5D);%0A        %7D%0A%0A        return output;%0A    %7D%0A%0A    /**%0A     * Converts a StackTraceElement to an IData representation.%0A     *%0A     * @param stackTraceElement The StackTraceElement to be converted.%0A     * @return                  The IData representation of the given StackTraceElement.%0A     */%0A    public static IData toIData(StackTraceElement stackTraceElement) %7B%0A        if (stackTraceElement == null) return null;%0A%0A        IData output = IDataFactory.create();%0A        IDataCursor cursor = output.getCursor();%0A%0A        IDataUtil.put(cursor, %22description%22, stackTraceElement.toString());%0A%0A        String file = stackTraceElement.getFileName();%0A        if (file != null) IDataUtil.put(cursor, %22file%22, file);%0A%0A        IDataUtil.put(cursor, %22class%22, stackTraceElement.getClassName());%0A        IDataUtil.put(cursor, %22method%22, stackTraceElement.getMethodName());%0A%0A        int line = stackTraceElement.getLineNumber();%0A        if (line %3E= 0) IDataUtil.put(cursor, %22line%22, %22%22 + line);%0A%0A        IDataUtil.put(cursor, %22native?%22, %22%22 + stackTraceElement.isNativeMethod());%0A%0A        cursor.destroy();%0A%0A        return output;%0A    %7D%0A%7D%0A

Add StackTraceElementHelper class