AgentJar (JaCoCo 0.6.3.201306030806 API)
Date: 2013-06-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jacoco.agent
Class AgentJar

    java.lang.Object
      org.jacoco.agent.AgentJar

    public final class AgentJar

extends Object

API to access the agent JAR file as a resource. While the agent is a JAR file it is considered as a plain resource that must be configured for the application under test (target JVM). The agent JAR does not provide any public Java API.

Method Summary
`static void` | `extractTo(File destination)` Extract the JaCoCo agent JAR and put it into the specified location.
`static File` | `extractToTempLocation()` Extract the JaCoCo agent JAR and put it into a temporary location.
`static URL` | `getResource()` Returns a URL pointing to the JAR file.
`static InputStream` | `getResourceAsStream()` Returns the content of the JAR file as a stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getResource

    public static URL getResource()

  Returns a URL pointing to the JAR file.

  Returns:
    URL of the JAR file

### getResourceAsStream

    public static InputStream getResourceAsStream()

  Returns the content of the JAR file as a stream.

  Returns:
    content of the JAR file

### extractToTempLocation

    public static File extractToTempLocation()
                                      throws IOException

  Extract the JaCoCo agent JAR and put it into a temporary location. This file should be deleted on exit, but may not if the VM is terminated

  Returns:
    Location of the Agent Jar file in the local file system. The file should exist and be readable.
  Throws:
    `IOException` - Unable to unpack agent jar

### extractTo

    public static void extractTo(File destination)
                          throws IOException

  Extract the JaCoCo agent JAR and put it into the specified location.

  Parameters:
    `destination` - Location to write JaCoCo Agent Jar to. Must be writeable
  Throws:
    `IOException` - Unable to unpack agent jar

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009-2013 Mountainminds GmbH & Co. KG. All Rights Reserved.