[go: nahoru, domu]

Skip to content

Commit

Permalink
Trac #133: Hide internal implementation classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
marchof committed Jan 12, 2011
1 parent bb751b0 commit e947d5e
Show file tree
Hide file tree
Showing 71 changed files with 130 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.lang.instrument.IllegalClassFormatException;
import java.security.ProtectionDomain;

import org.jacoco.core.instr.CRC64;
import org.jacoco.core.data.CRC64;
import org.jacoco.core.instr.Instrumenter;
import org.jacoco.core.runtime.AgentOptions;
import org.jacoco.core.runtime.IRuntime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.data;

import static org.junit.Assert.assertTrue;

import java.io.UnsupportedEncodingException;

import org.jacoco.core.data.CRC64;
import org.junit.Test;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import org.jacoco.core.internal.instr.ClassInstrumenter;
import org.jacoco.core.runtime.IRuntime;
import org.jacoco.core.runtime.LoggerRuntime;
import org.junit.Before;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import static org.junit.Assert.assertEquals;

import org.jacoco.core.internal.instr.InstrSupport;
import org.junit.Before;
import org.junit.Test;
import org.objectweb.asm.util.TraceMethodVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import static org.junit.Assert.assertEquals;

import org.jacoco.core.instr.MethodRecorder;
import org.jacoco.core.internal.flow.LabelInfo;
import org.jacoco.core.internal.instr.MethodInstrumenter;
import org.junit.Before;
import org.junit.Test;
import org.objectweb.asm.ClassVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import static org.junit.Assert.assertEquals;

import java.util.Arrays;

import org.jacoco.core.internal.instr.ProbeVariableInserter;
import org.junit.Test;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
Expand Down
2 changes: 1 addition & 1 deletion org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import org.jacoco.core.data.CRC64;
import org.jacoco.core.data.ExecutionData;
import org.jacoco.core.data.ExecutionDataStore;
import org.jacoco.core.instr.CRC64;
import org.jacoco.core.internal.analysis.ClassAnalyzer;
import org.jacoco.core.internal.analysis.ContentTypeDetector;
import org.jacoco.core.internal.flow.ClassProbesAdapter;
Expand Down
14 changes: 8 additions & 6 deletions org.jacoco.core/src/org/jacoco/core/analysis/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@

/**
* <p>
* Structures to represent coverage information in node hierarchies. Each node
* represents a Java element like class or method. The coverage information is
* build from {@linkplain org.jacoco.core.analysis.ICoverageVisitor structure}
* and {@linkplain org.jacoco.core.data.IExecutionDataVisitor execution}</a>
* information.
* APIs for coverage calculation and analysis. The coverage information is
* calculated with an {@link org.jacoco.core.analysis.Analyzer} instance from
* class files (target) and
* {@linkplain org.jacoco.core.data.IExecutionDataVisitor execution data}</a>
* (actual).
* </p>
*
* <p>
* A coverage analysis is represented in the following node hierarchy:
* The {@link org.jacoco.core.analysis.CoverageBuilder} creates a hierarchy of
* {@link org.jacoco.core.analysis.ICoverageNode} instances with the following
* {@link org.jacoco.core.analysis.ICoverageNode.ElementType types}:
* </p>
*
* <pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.data;

/**
* CRC64 checksum calculator based on the polynom specified in ISO 3309. The
Expand Down
2 changes: 2 additions & 0 deletions org.jacoco.core/src/org/jacoco/core/instr/Instrumenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
import java.io.IOException;
import java.io.InputStream;

import org.jacoco.core.data.CRC64;
import org.jacoco.core.internal.flow.ClassProbesAdapter;
import org.jacoco.core.internal.instr.ClassInstrumenter;
import org.jacoco.core.runtime.IRuntime;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
Expand Down
11 changes: 2 additions & 9 deletions org.jacoco.core/src/org/jacoco/core/instr/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,8 @@

/**
* <p>
* Analysis and instrumentation of Java class files for code coverage. The main
* entry points are:
* Instrumentation of Java class files for code coverage. The main entry point
* is the class {@link org.jacoco.core.instr.Instrumenter}.
* </p>
*
* <ul>
* <li>{@link org.jacoco.core.analysis.Analyzer}: Class structure information for
* analysis and report generation.</li>
* <li>{@link org.jacoco.core.instr.Instrumenter}: Classes instrumentation for
* tracing coverage at runtime.</li>
* </ul>
*/
package org.jacoco.core.instr;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import static java.lang.String.format;

Expand All @@ -29,7 +29,8 @@
* @author Marc R. Hoffmann
* @version $qualified.bundle.version$
*/
class ClassInstrumenter extends ClassAdapter implements IClassProbesVisitor {
public class ClassInstrumenter extends ClassAdapter implements
IClassProbesVisitor {

private static final Object[] STACK_ARRZ = new Object[] { InstrSupport.DATAFIELD_DESC };

Expand Down Expand Up @@ -147,7 +148,7 @@ private void createInitMethod(final int probeCount) {
InstrSupport.INITMETHOD_ACC, InstrSupport.INITMETHOD_NAME,
InstrSupport.INITMETHOD_DESC, null, null);
mv.visitCode();

// Load the value of the static data field:
mv.visitFieldInsn(Opcodes.GETSTATIC, className,
InstrSupport.DATAFIELD_NAME, InstrSupport.DATAFIELD_DESC);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import org.jacoco.core.internal.flow.IMethodProbesVisitor;
import org.jacoco.core.internal.flow.LabelInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.core.instr;
package org.jacoco.core.internal.instr;

import org.objectweb.asm.Label;
import org.objectweb.asm.MethodAdapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
package org.jacoco.core.runtime;

import org.jacoco.core.data.ExecutionDataStore;
import org.jacoco.core.instr.InstrSupport;
import org.jacoco.core.internal.instr.InstrSupport;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.logging.LogRecord;
import java.util.logging.Logger;

import org.jacoco.core.instr.InstrSupport;
import org.jacoco.core.internal.instr.InstrSupport;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.net.URLStreamHandler;
import java.util.Hashtable;

import org.jacoco.core.instr.InstrSupport;
import org.jacoco.core.internal.instr.InstrSupport;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

Expand Down
8 changes: 4 additions & 4 deletions org.jacoco.doc/javadoc/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<h2>Bundle org.jacoco.core</h2>

<p>
The core bundle implements the code coverage technology itself. It
provides APIs and implementation for
The core bundle implements the code coverage technology itself. It provides
APIs and implementation for
</p>

<ul>
<li>class file analysis and instrumentation,</li>
<li>class file instrumentation,</li>
<li>collecting execution data at runtime and</li>
<li>calculating and storing coverage data.</li>
<li>analyzing coverage data.</li>
</ul>

<h2>Bundle org.jacoco.agent</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import static org.junit.Assert.assertEquals;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringWriter;

import org.jacoco.report.internal.html.HTMLDocument;
import org.junit.Test;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import static org.junit.Assert.assertEquals;

import java.io.IOException;
import java.io.StringWriter;

import org.jacoco.report.internal.html.HTMLElement;
import org.junit.Before;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import javax.xml.parsers.ParserConfigurationException;

import org.jacoco.report.xml.XMLSupport;
import org.jacoco.report.internal.xml.XMLSupport;

/**
* Support for verifying XHTML documents.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import org.jacoco.report.ReportOutputFolder;
import org.jacoco.report.internal.html.ILinkable;

/**
* Stub implementation for {@link ILinkable}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import static org.junit.Assert.assertEquals;

Expand All @@ -24,6 +24,10 @@
import org.jacoco.report.IReportVisitor;
import org.jacoco.report.MemoryMultiReportOutput;
import org.jacoco.report.ReportOutputFolder;
import org.jacoco.report.internal.html.HTMLElement;
import org.jacoco.report.internal.html.IHTMLReportContext;
import org.jacoco.report.internal.html.ILinkable;
import org.jacoco.report.internal.html.NodePage;
import org.jacoco.report.internal.html.index.IIndexUpdate;
import org.jacoco.report.internal.html.resources.Resources;
import org.jacoco.report.internal.html.resources.Styles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import static org.junit.Assert.assertEquals;

Expand All @@ -19,6 +19,9 @@
import org.jacoco.report.ILanguageNames;
import org.jacoco.report.MemoryMultiReportOutput;
import org.jacoco.report.ReportOutputFolder;
import org.jacoco.report.internal.html.HTMLElement;
import org.jacoco.report.internal.html.IHTMLReportContext;
import org.jacoco.report.internal.html.ILinkable;
import org.jacoco.report.internal.html.index.IIndexUpdate;
import org.jacoco.report.internal.html.resources.Resources;
import org.jacoco.report.internal.html.resources.Styles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import static org.junit.Assert.assertEquals;

Expand All @@ -26,6 +26,9 @@
import org.jacoco.report.JavaNames;
import org.jacoco.report.MemoryMultiReportOutput;
import org.jacoco.report.ReportOutputFolder;
import org.jacoco.report.internal.html.HTMLElement;
import org.jacoco.report.internal.html.IHTMLReportContext;
import org.jacoco.report.internal.html.ILinkable;
import org.jacoco.report.internal.html.index.ElementIndex;
import org.jacoco.report.internal.html.index.IIndexUpdate;
import org.jacoco.report.internal.html.resources.Resources;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package org.jacoco.report.html;
package org.jacoco.report.internal.html;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down Expand Up @@ -112,7 +112,7 @@ public void testVisitChild() {
@Test
public void testContents() throws Exception {
final SourceFileCoverageImpl node = new SourceFileCoverageImpl(
"SourceFilePageTest.java", "org/jacoco/report/html");
"SourceFilePageTest.java", "org/jacoco/report/internal/html");
final SourceFilePage page = new SourceFilePage(node, null, root,
context);
page.visitEnd(locator);
Expand Down
Loading

0 comments on commit e947d5e

Please sign in to comment.