|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.util.JoinPointHelper
public final class JoinPointHelper
The Class JoinPointHelper.
| Method Summary | |
|---|---|
static String |
getArgAsShortString(Object obj)
Gets the arg as short string. |
static String |
getArgAsString(Object obj)
Gets the arg as string. |
static String |
getArgsAsShortString(Object[] args)
Gets the args as short string. |
static String |
getArgsAsString(Object[] args)
Gets the args as string. |
static String |
getAsLongString(JoinPoint joinpoint)
Gets the as long string. |
static String |
getAsShortString(JoinPoint joinpoint)
Gets the as short string. |
static String |
getAsString(JoinPoint joinpoint)
Gets the given joinpoint as string. |
static Class<?> |
getCallerClass()
Gets the caller class by examing the stacktrace. |
static Class<?> |
getCallerClass(Class<?>... excluded)
Gets the caller class by examing the stacktrace. |
static Class<?> |
getCallerClass(Pattern... excluded)
Deprecated. Use StackTraceScanner.getCallerClass(Pattern...) instead |
static StackTraceElement |
getCallerOf(JoinPoint jp)
Gets the caller of the given joinpoint. |
static StackTraceElement |
getCallerOf(JoinPoint jp,
Pattern... excluded)
Gets the caller of the given joinpoint. |
static Annotation |
getClassAnnotation(JoinPoint jp,
Class<? extends Annotation> annotationClass)
Returns the annotation for the given JoinPoint. |
static Annotation[][] |
getParameterAnnotations(JoinPoint joinpoint)
Gets the parameter annotations. |
static boolean |
isInnerClass(JoinPoint jp)
The Java compiler generates something like OuterClass$InnerClass as name for the inner class. |
static boolean |
isInnerClass(Signature sig)
The Java compiler generates something like OuterClass$InnerClass as name for the inner class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getAsString(JoinPoint joinpoint)
joinpoint - the joinpoint
public static String getAsShortString(JoinPoint joinpoint)
joinpoint - the joinpoint
public static String getAsLongString(JoinPoint joinpoint)
joinpoint - the joinpoint
@MayReturnNull public static Annotation[][] getParameterAnnotations(JoinPoint joinpoint)
joinpoint - should be a Method- or Constructor-Signature
@MayReturnNull
public static Annotation getClassAnnotation(JoinPoint jp,
Class<? extends Annotation> annotationClass)
jp - the JoinPointannotationClass - the wanted annotation
@NullArgsAllowed public static String getArgsAsString(Object[] args)
args - the args
@NullArgsAllowed public static String getArgsAsShortString(Object[] args)
args - the args
@NullArgsAllowed public static String getArgAsString(Object obj)
obj - the obj
@NullArgsAllowed public static String getArgAsShortString(Object obj)
obj - the obj
public static boolean isInnerClass(JoinPoint jp)
jp - the jp
public static boolean isInnerClass(Signature sig)
sig - the sig
public static Class<?> getCallerClass()
Sometime the caller of the method is an aspect. Because normally you
do not want the aspect it is filtered out. If you really want it call
getCallerOf(JoinPoint, Pattern...) direct with an empty pattern
argument.
getCallerOf(JoinPoint, Pattern...)public static Class<?> getCallerClass(Class<?>... excluded)
Sometime the caller of the method is an aspect. With this method you have the chance to list the aspects which should be ignored.
excluded - the excluded
@Deprecated public static Class<?> getCallerClass(Pattern... excluded)
StackTraceScanner.getCallerClass(Pattern...) instead
excluded - a list of filters which should be not considered as
caller
public static StackTraceElement getCallerOf(JoinPoint jp)
Sometime the caller of the method is an aspect. Because normally you
do not want the aspect it is filtered out. If you really want it call
getCallerOf(JoinPoint, Pattern...) direct with an empty pattern
argument.
jp - the (execution) joinpoint
getCallerOf(JoinPoint, Pattern...)
public static StackTraceElement getCallerOf(JoinPoint jp,
Pattern... excluded)
jp - the (execution) joinpointexcluded - a list of filters which should be not considered as
caller
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||