Class MethodDescriptor

  • All Implemented Interfaces:
    Serializable

    public final class MethodDescriptor
    extends Descriptor
    A deployment object representing a single method or a collection of methods on Enterprise Bean classes.
    Author:
    Danny Coward
    See Also:
    Serialized Form
    • Constructor Detail

      • MethodDescriptor

        public MethodDescriptor​(String name,
                                String description,
                                String[] parameterClassNames,
                                String ejbClassSymbol)
        Constructs a method descriptor corresponding to methods on the ejb class defined by the ejbClassSymbol (or home and remote if null) with the same name (or all if ALL_METHODS) and paramater list (or just all by name of this is null). (Styles 1 2 and 3 in the ejb specification)
      • MethodDescriptor

        public MethodDescriptor​(String name,
                                String description,
                                String ejbClassSymbol)
        Constructor for styles 2 and 1. Style 1 iff ALL_METHODS is used
      • MethodDescriptor

        public MethodDescriptor​(Method method,
                                String methodIntf)
        Construct an exact method descriptor from the given method object, classloader and ejb descriptor.
      • MethodDescriptor

        public MethodDescriptor​(Method method)
        Construct an method descriptor from the given method object.
      • MethodDescriptor

        public MethodDescriptor()
    • Method Detail

      • setEmptyParameterClassNames

        public void setEmptyParameterClassNames()
      • addParameterClass

        public void addParameterClass​(String parameter)
      • setEjbName

        public void setEjbName​(String ejbName)
      • getEjbName

        public String getEjbName()
      • isExact

        public boolean isExact()
        Returns true if I have enough information to specifiy a unique method on an ejb's home or remote interface unambiguously.
      • getStyle

        public int getStyle()

        Returns:
        the style level of this method descriptors. According to the J2EE spec, methods can be described byt using style 1, style 2 or style 3 xml tags.

      • getMethod

        public Method getMethod​(Class declaringClass)
      • getDeclaredMethod

        public Method getDeclaredMethod​(Class declaringClass)
      • doStyleConversion

        public Vector doStyleConversion​(EjbDescriptor ejbDescriptor,
                                        Collection allMethods)
        Performs a conversion from the style1 style2 and style3 (no interface symbol) to method descriptors of style3 with an interface symbol.
      • getEjbClassSymbol

        public String getEjbClassSymbol()
        Returns the ejb class sybol for this method descriptor.
      • setEjbClassSymbol

        public void setEjbClassSymbol​(String ejbClassSymbol)
        Sets the ejb class sybol for this method descriptor.
      • getFormattedString

        public String getFormattedString()
      • getPrettyParameterString

        public String getPrettyParameterString()
      • getParameterClassNames

        public String[] getParameterClassNames()
      • getJavaParameterClassNames

        public String[] getJavaParameterClassNames()
      • equals

        public boolean equals​(Object other)
        Equlity iff the parameter names match and the name matches.
        Overrides:
        equals in class Object
      • implies

        public boolean implies​(Object other)
        Indicates if a method descriptor implies the other one
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • prettyPrint

        public String prettyPrint()
      • getParameterClassNamesFor

        public String[] getParameterClassNamesFor​(Method method,
                                                  Class[] paramTypes)
      • xmlFormat2JavaClassNames

        public static String xmlFormat2JavaClassNames​(String param)
      • getJavaPrimitiveTypes

        public static Map getJavaPrimitiveTypes()
        Computes the mapping between java primitive type and class loaders identifier for such types.
        Returns:
        the mapping with the java primitive type identifier as keys
      • fixParamClassName

        public static String fixParamClassName​(String param)