Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static String getTestGroupName() {
        return "group" + getSubString(getMethodName(), "_");
    }

    public static String getSubString(String str, String string) {
        return str.substring(str.indexOf(string));
    }

    public static String getSubString(String str, String string, int index) {
        return str.substring(str.indexOf(string) + index);
    }

    public static String getMethodName() {

        return Thread.currentThread().getStackTrace()[4].getMethodName();
    }
}