[Question] TypeMatcher for Thread class and subclasses?
See original GitHub issueByteBuddy version: 1.10.10
.
I’m trying to instrument java.lang.Thread
class and its subclasses using the following matcher:
- TypeMatcher:
hasSuperType(named("java.lang.Thread"))).or(named("java.lang.Thread")
- CLMatcher:
any()
The classes which extends java.lang.Thread
are discovered by the agent but the java.lang.Thread
itself is not.
If I use
- TypeMatcher:
named("java.lang.Thread")
- CLMatcher:
any()
The java.lang.Thread
is discovered by the agent without problems.
Is there a mistake in the TypeMatcher I’m using? Is there any limitation in this kind of TypeMatchers?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Confusion with subclassing a threading class, and inheritance
If I try to call MyThread._target I get an error. So it seems as if they are creating a completely new init ....
Read more >Subclassing Thread and Overriding run
The first way to customize a thread is to subclass Thread (itself a Runnable object) and override its empty run method so that...
Read more >Python Multithreading Tutorial: Subclassing Thread - 2020
To create our own thread in Python, we'll want to make our class to work as a thread. For this, we should subclass...
Read more >TypeMatcher class - matcher library - Flutter - Dart API docs
A Matcher subclass that supports validating the Type of the target object. expect(shouldBeDuration, TypeMatcher<Duration>());.
Read more >Java.lang.Thread Class in Java - GeeksforGeeks
Java provides a thread class that has various method calls in order to manage the behavior of threads by providing constructors and methods...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I assume they do some things to monitor started thread what then gets in the way.
Thanks for your help! I close the issue.