Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*
 * z2env.org - (c) ZFabrik Software KG
 * 
 * Licensed under Apache 2.
 * 
 * www.z2-environment.net
 */

public class Main {
    /**
     * Extracts module name from component name (i.e. the "/" separated prefix)
     */
    public static String moduleOf(String componentName) {
        int p = componentName.lastIndexOf('/');
        if (p >= 0) {
            return componentName.substring(0, p);
        }
        return null;
    }
}