Package cn.shenyanchao.utils

Source Code of cn.shenyanchao.utils.PackageUtils

package cn.shenyanchao.utils;

import japa.parser.ast.PackageDeclaration;
import japa.parser.ast.expr.NameExpr;

/**
* Created with IntelliJ IDEA.
*
* @author shenyanchao
*         Date:  6/18/13
*         Time:  1:48 PM
*/
public class PackageUtils {

    public static String getTestPackageNameFrom(PackageDeclaration packageDeclaration) {
        if (null == packageDeclaration) {
            return "test";
        } else {
            NameExpr packageNameExpr = packageDeclaration.getName();
            String packageName = packageNameExpr.toString();
            return packageName + ".test";
        }
    }
}
TOP

Related Classes of cn.shenyanchao.utils.PackageUtils

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.