org.objectweb.jonas_ejb.deployment.api
Class MethodDesc

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.deployment.api.MethodDesc
Direct Known Subclasses:
MethodJdbcDesc

public class MethodDesc
extends java.lang.Object

Class for deployment descriptors of methods. Holds description of transaction attributes


Field Summary
protected static java.lang.String[] APPLY_TO
           
static int APPLY_TO_BEAN
           
static int APPLY_TO_BEAN_METHOD
           
static int APPLY_TO_BEAN_METHOD_NAME
           
static int APPLY_TO_CLASS
           
static int APPLY_TO_CLASS_METHOD
           
static int APPLY_TO_CLASS_METHOD_NAME
           
static int APPLY_TO_NOTHING
           
static int TX_MANDATORY
           
static int TX_NEVER
           
static int TX_NOT_SET
          Set of constants for method transaction attribute
static int TX_NOT_SUPPORTED
           
static int TX_REQUIRED
           
static int TX_REQUIRES_NEW
           
static int TX_SUPPORTS
           
 
Constructor Summary
protected MethodDesc(MethodDesc object)
          Protected copy constructor used by API
 
Method Summary
protected static java.lang.String getClassName(java.lang.Class c)
          Returns common name of a given type
For example it returns int[] for an array of int
 java.lang.String[] getRoleName()
          String representation of the roles which can execute the method
 int getTxAttribute()
          Get the container transaction attribute that match the method
 java.lang.String getTxAttributeName()
          String representation of the transactionnal attribute
static java.lang.String getTxAttributeName(int value)
          String representation of the transactionnal attribute
 int getTxAttributeStatus()
          Get the container transaction attribute that match the method
static int matchPattern(java.lang.reflect.Method meth, java.lang.Class pclass, java.lang.String mName, MethodParams patternMethodParams)
          Get the status of applicability for a given pattern to a method
static java.lang.String methodElementToString(Method m)
          String representation of the given element
 java.lang.String toString()
          String representation of the object for test purpose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TX_NOT_SET

public static final int TX_NOT_SET
Set of constants for method transaction attribute

TX_NOT_SUPPORTED

public static final int TX_NOT_SUPPORTED

TX_REQUIRED

public static final int TX_REQUIRED

TX_SUPPORTS

public static final int TX_SUPPORTS

TX_REQUIRES_NEW

public static final int TX_REQUIRES_NEW

TX_MANDATORY

public static final int TX_MANDATORY

TX_NEVER

public static final int TX_NEVER

APPLY_TO_NOTHING

public static final int APPLY_TO_NOTHING

APPLY_TO_BEAN

public static final int APPLY_TO_BEAN

APPLY_TO_CLASS

public static final int APPLY_TO_CLASS

APPLY_TO_BEAN_METHOD_NAME

public static final int APPLY_TO_BEAN_METHOD_NAME

APPLY_TO_CLASS_METHOD_NAME

public static final int APPLY_TO_CLASS_METHOD_NAME

APPLY_TO_BEAN_METHOD

public static final int APPLY_TO_BEAN_METHOD

APPLY_TO_CLASS_METHOD

public static final int APPLY_TO_CLASS_METHOD

APPLY_TO

protected static final java.lang.String[] APPLY_TO
Constructor Detail

MethodDesc

protected MethodDesc(MethodDesc object)
Protected copy constructor used by API
Method Detail

matchPattern

public static int matchPattern(java.lang.reflect.Method meth,
                               java.lang.Class pclass,
                               java.lang.String mName,
                               MethodParams patternMethodParams)
Get the status of applicability for a given pattern to a method
Returns:
status of applicability APPLY_TO_NOTHING,APPLY_TO_BEAN,APPLY_TO_CLASS,APPLY_TO_METHOD_NAME,APPLY_TO_METHOD

getClassName

protected static java.lang.String getClassName(java.lang.Class c)
Returns common name of a given type
For example it returns int[] for an array of int
Returns:
String with the name of the given type

getTxAttribute

public int getTxAttribute()
Get the container transaction attribute that match the method
Returns:
Constant value within list : TX_NOT_SUPPORTED,TX_REQUIRED,TX_SUPPORTS,TX_REQUIRES_NEW,TX_MANDATORY,TX_NEVER,TX_NOT_SET

getTxAttributeStatus

public int getTxAttributeStatus()
Get the container transaction attribute that match the method
Returns:
Constant value within list : APPLY_TO_NOTHING, APPLY_TO_BEAN, APPLY_TO_CLASS, APPLY_TO_BEAN_METHOD_NAME, APPLY_TO_CLASS_METHOD_NAME, APPLY_TO_BEAN_METHOD, APPLY_TO_CLASS_METHOD

getTxAttributeName

public static java.lang.String getTxAttributeName(int value)
String representation of the transactionnal attribute
Returns:
String representation of this transactionnal attribute

getTxAttributeName

public java.lang.String getTxAttributeName()
String representation of the transactionnal attribute
Returns:
String representation of this transactionnal attribute

getRoleName

public java.lang.String[] getRoleName()
String representation of the roles which can execute the method
Returns:
Array of String representing the roles which can execute the method

toString

public java.lang.String toString()
String representation of the object for test purpose
Overrides:
toString in class java.lang.Object
Returns:
String representation of this object

methodElementToString

public static java.lang.String methodElementToString(Method m)
String representation of the given element
Parameters:
m - an element
Returns:
String representation of the given element method