this interface using the addTransformer method so that the transformer’s transform method is invoked when classes are loaded, redefined, or retransformed – ClassFileTransformer Documentation
code level also constructors and static initializers are counted as methods. Some of these methods may not have a direct correspondence in Java source code, like implicit and thus generated default constructors or initializers for constants. “ https://www.jacoco.org/jacoco/trunk/doc/counters.html
object references: • It is reflexive • It is symmetric • It is transitive • It is consistent https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-
object references: • It is reflexive • It is symmetric • It is transitive • It is consistent https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-
be a painful or impossible task in frameworks that use their own class loading mechanisms. […] As our minimum target is Java 1.5 JaCoCo decouples the instrumented classes and the coverage runtime through official JRE API types only. The instrumented classes communicate through the Object.equals(Object) method with the runtime. A instrumented class can retrieve its probe array instance with the following code. JaCoCo – Implementation Design https://www.jacoco.org/jacoco/trunk/doc/implementation.html “
access to the runtime data * is thread safe. !*/ public class RuntimeData { !/* !!... !*/ !!/** * In violation of the regular semantic of {@link Object#equals(Object)} * this implementation is used as the interface to the execution data store. * * @param args * the arguments as an {@link Object} array * @return has no meaning !*/ @Override public boolean equals(final Object args) { if (args instanceof Object[]) { getProbes((Object[]) args); } return super.equals(args); } !/* !!... !*/ https://github.com/jacoco/jacoco/blob/f0dcc6b0b78b04dd94617707551f6c2d18426d09/org.jacoco.core/src/org/jacoco/core/runtime/RuntimeData.java
of all classes currently loaded !*/ @SuppressWarnings("rawtypes") Class[] getAllLoadedClasses(); Based on: https://github.com/openjdk/jdk/blob/bc5cde1b198baf6e2e36d370b0aaa907c8f35777/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java#L74
on: https://github.com/openjdk/jdk/blob/bc5cde1b198baf6e2e36d370b0aaa907c8f35777/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java#L74