org.ow2.jonas.lib.util
Class BeanNaming

java.lang.Object
  extended by org.ow2.jonas.lib.util.BeanNaming

public class BeanNaming
extends Object

This class is made for hiding Naming convention in all JOnAS framework.
(Among other things, names of the implementation classes of the Enterprise Bean's Home and Enterprise Bean Remote interfaces generated by the GenIC tools.)
It is used by the EJB generation tools and framework

Author:
Helene Joanin, Joe Gittings has proposed to code method signature in order to avoid same signature for inherited methods, Christophe Ney [cney@batisseurs.com], Sebastien Chassande-Barrioz

Constructor Summary
BeanNaming()
           
 
Method Summary
static String firstToUpperCase(String s)
          returns the given string with the first character converted to upper case
static String getBaseName(String fullName)
          returns the basename of the given full name
static String getClassName(String packageName, String name)
          return full name of a class for given package and class names
static String getJonasXmlName(String stdXmlName)
          returns the name of the JOnAS specific deployment descriptor file's name corresponding to the given standard deployment descriptor file's name.
static String getPackageName(String name)
          returns the name of the package of the given full name
static String getParentName(String fileName)
          returns the name of the parent directory
static String getPath(String fullName)
          returns the full path of the file name.
static String getSignature(String ejbName, Method method)
          Gets a string that represents the signature of a method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanNaming

public BeanNaming()
Method Detail

getPackageName

public static String getPackageName(String name)
returns the name of the package of the given full name


getClassName

public static String getClassName(String packageName,
                                  String name)
return full name of a class for given package and class names

Parameters:
packageName - possibly empty package name
name - class name
Returns:
fully qualified class name

getBaseName

public static String getBaseName(String fullName)
returns the basename of the given full name


getPath

public static String getPath(String fullName)
returns the full path of the file name. mainly replace '.' by '/'.


firstToUpperCase

public static String firstToUpperCase(String s)
returns the given string with the first character converted to upper case


getJonasXmlName

public static String getJonasXmlName(String stdXmlName)
returns the name of the JOnAS specific deployment descriptor file's name corresponding to the given standard deployment descriptor file's name. (ex: returns "jonas-XXX.xml" for "XXX.xml" and "../../jonas-XXX.xml" for "../../XXX.xml")


getParentName

public static String getParentName(String fileName)
returns the name of the parent directory


getSignature

public static String getSignature(String ejbName,
                                  Method method)
Gets a string that represents the signature of a method

Parameters:
ejbName - name of the ejb
method - Method on which the signature is required
Returns:
string that represents the signature of a method


Copyright © 2010 OW2 Consortium. All Rights Reserved.