001    /*
002     * $Id: LangUtil.java,v 1.1 2004/11/20 08:14:05 mitch Exp $
003     * 
004     * Copyright (c) 2004, FullSpan Software (www.fullspan.com)
005     *
006     * Licensed under the BSD License
007     * OSI Certified Open Source Software (www.opensource.org)
008     *
009     * You may not use this file except in compliance with the License.  You should
010     * have received a copy of the License with this distribution, or you can find
011     * it at: http://www.fullspan.com/shared/license.html.
012     *
013     * NO WARRANTY - USE AT YOUR OWN RISK.  All software and other materials
014     * distributed under the License are provided on an "AS IS" BASIS, WITHOUT
015     * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016     */
017    package com.fullspan.util;
018    
019    /**
020     * 
021     * @author Mitch Stuart
022     */
023    public class LangUtil
024    {
025       public static String getInvokingClassName()
026       {
027          return new Throwable().getStackTrace()[1].getClassName();
028       }
029    
030       // Constructor
031       
032       /**
033        * Private constructor throws UnsupportedOperationException
034        * (this class cannot be instantiated).
035        * 
036        * @throws UnsupportedOperationException if called
037        */
038       private LangUtil()
039       {
040          throw new UnsupportedOperationException(
041             "This class is a collection of static utility methods - " +
042             "it cannot be instantitated");
043       }
044    
045    }