org.apache.openejb.assembler.classic
Class MethodInfoUtil
java.lang.Object
org.apache.openejb.assembler.classic.MethodInfoUtil
public class MethodInfoUtil
- extends Object
- Version:
- $Rev$ $Date$
|
Method Summary |
static Method |
getMethod(Class clazz,
MethodInfo info)
|
static MethodInfoUtil.Level |
level(MethodInfo methodInfo)
|
static boolean |
match(Method methodA,
Method methodB)
|
static boolean |
matches(Method method,
MethodInfo methodInfo)
|
static boolean |
matches(Method method,
NamedMethodInfo methodInfo)
|
static boolean |
matches(Method method,
String methodName,
List<String> methodParams)
|
static List<Method> |
matchingMethods(Method signature,
Class clazz)
|
static List<Method> |
matchingMethods(MethodInfo mi,
Class clazz)
|
static List<Method> |
matchingMethods(MethodInfo mi,
Method[] methods)
|
static List<MethodPermissionInfo> |
normalizeMethodPermissionInfos(List<MethodPermissionInfo> infos)
This method splits the MethodPermissionInfo objects so that there is
exactly one MethodInfo per MethodPermissionInfo. |
static Map<Method,MethodAttributeInfo> |
resolveAttributes(List<? extends MethodAttributeInfo> infos,
BeanContext beanContext)
|
static Map<MethodInfoUtil.ViewMethod,MethodAttributeInfo> |
resolveViewAttributes(List<? extends MethodAttributeInfo> infos,
BeanContext beanContext)
|
static Method |
toMethod(Class clazz,
NamedMethodInfo info)
Finds the nearest java.lang.reflect.Method with the given NamedMethodInfo
Callbacks can be private so class.getMethod() cannot be used. |
static String |
toString(MethodConcurrencyInfo i)
|
static String |
toString(MethodInfo i)
|
static String |
toString(MethodPermissionInfo i)
|
static String |
toString(MethodTransactionInfo i)
|
static MethodInfoUtil.View |
view(MethodInfo methodInfo)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodInfoUtil
public MethodInfoUtil()
toMethod
public static Method toMethod(Class clazz,
NamedMethodInfo info)
- Finds the nearest java.lang.reflect.Method with the given NamedMethodInfo
Callbacks can be private so class.getMethod() cannot be used. Searching
starts by looking in the specified class, if the method is not found searching continues with
the immediate parent and continues recurssively until the method is found or java.lang.Object
is reached. If the method is not found a IllegalStateException is thrown.
- Parameters:
clazz - methodName - parameterTypes -
- Returns:
-
- Throws:
IllegalStateException - if the method is not found in this class or any of its parent classes
matchingMethods
public static List<Method> matchingMethods(Method signature,
Class clazz)
matchingMethods
public static List<Method> matchingMethods(MethodInfo mi,
Class clazz)
matchingMethods
public static List<Method> matchingMethods(MethodInfo mi,
Method[] methods)
getMethod
public static Method getMethod(Class clazz,
MethodInfo info)
normalizeMethodPermissionInfos
public static List<MethodPermissionInfo> normalizeMethodPermissionInfos(List<MethodPermissionInfo> infos)
- This method splits the MethodPermissionInfo objects so that there is
exactly one MethodInfo per MethodPermissionInfo. A single MethodPermissionInfo
with three MethodInfos would be expanded into three MethodPermissionInfo with
one MethodInfo each.
The MethodPermissionInfo list is then sorted from least to most specific.
- Parameters:
infos -
- Returns:
- a normalized list of new MethodPermissionInfo objects
resolveAttributes
public static Map<Method,MethodAttributeInfo> resolveAttributes(List<? extends MethodAttributeInfo> infos,
BeanContext beanContext)
resolveViewAttributes
public static Map<MethodInfoUtil.ViewMethod,MethodAttributeInfo> resolveViewAttributes(List<? extends MethodAttributeInfo> infos,
BeanContext beanContext)
match
public static boolean match(Method methodA,
Method methodB)
matches
public static boolean matches(Method method,
MethodInfo methodInfo)
matches
public static boolean matches(Method method,
NamedMethodInfo methodInfo)
matches
public static boolean matches(Method method,
String methodName,
List<String> methodParams)
view
public static MethodInfoUtil.View view(MethodInfo methodInfo)
level
public static MethodInfoUtil.Level level(MethodInfo methodInfo)
toString
public static String toString(MethodInfo i)
toString
public static String toString(MethodPermissionInfo i)
toString
public static String toString(MethodTransactionInfo i)
toString
public static String toString(MethodConcurrencyInfo i)
Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.