I'm profiling a java application, and the largest number of the allocated objects have name
com.x.y.ClassName$5
.
Both the netbeans profiler and the yourkit use the same naming convention. I'm at loss how to google the naming problem.
What is $5
after class name?
EDIT: It seems the $5 is fifth anonymous class declared. I've used javap on generated class to find which is the fifth anonymous class. Reference found in How to match compiled class name to an enum member in Java?
com.x.y.ClassName$5 means "the fifth anonymous inner class in com.x.y.ClassName"
Some links to help you. Also look at polygenelubricant's answer
you get com.x.y.ClassName$5. when your class contains a anonyomous inner class
sample8.class
sample8$1.class
sample8$2.class
sample8$klass.class
sample8$klass$1.class
Example
public class sample8 {
private class klass{
void vodka() {
sample8 _s = new sample8() {
};
}
}
sample8() {
klass _k = new klass();
_k.vodka();
}
public static void main(String args[])
{
}
sample8 _s = new sample8() {
};
sample8 _s1 = new sample8() {
};
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With