Package io.helidon.microprofile.testing
Interface Instrumented
public interface Instrumented
Marker interface for instrumented type.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T> T
allocateInstance
(Class<T> type) Instantiate a class without running constructors.static <T> Class
<? extends T> instrument
(Class<T> type, List<Annotation> annotations, List<Class<? extends Annotation>> methodExcludes, InvocationHandler handler) Create an instrumented class.static <T> Class
<? extends T> instrument
(Class<T> type, List<Annotation> annotations, List<Class<? extends Annotation>> methodExcludes, BiFunction<Class<T>, Method, T> resolver) Create an instrumented class.static boolean
isInstrumented
(Class<?> type) Test if the given type is instrumented.
-
Method Details
-
allocateInstance
Instantiate a class without running constructors.- Type Parameters:
T
- type- Parameters:
type
- type- Returns:
- instance
-
isInstrumented
Test if the given type is instrumented.- Parameters:
type
- type- Returns:
true
if instrumented,false
otherwise
-
instrument
static <T> Class<? extends T> instrument(Class<T> type, List<Annotation> annotations, List<Class<? extends Annotation>> methodExcludes, BiFunction<Class<T>, Method, T> resolver) Create an instrumented class.- Type Parameters:
T
- type- Parameters:
type
- typeannotations
- annotations to add to the proxy classmethodExcludes
- method annotations that skip interceptionresolver
- function to resolve the delegate- Returns:
- instrumented class
-
instrument
static <T> Class<? extends T> instrument(Class<T> type, List<Annotation> annotations, List<Class<? extends Annotation>> methodExcludes, InvocationHandler handler) Create an instrumented class.- Type Parameters:
T
- type- Parameters:
type
- typeannotations
- annotations to add to the proxy classmethodExcludes
- method annotations that skip interceptionhandler
- invocation handler- Returns:
- instrumented class
-