aboutsummaryrefslogtreecommitdiff
path: root/bindings/java/examples
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbarenblat@galois.com>2014-02-03 17:19:53 -0800
committerGravatar Benjamin Barenblat <bbarenblat@galois.com>2014-02-06 09:50:09 -0800
commitcc9249c85c50116813665d5753d81c3d5f11c9e7 (patch)
treeed31dd5412e7e04f4bd726c00c62ce519051676d /bindings/java/examples
parent0b617259a3c1c1f7e2c097e0f56d8ae3c5cc96f7 (diff)
Java: Add 'EnvironmentConfiguredTracer'
Adding 'ppaml_tracer_init_from_env' (commit b9dfb8d0) makes the Java code substantially more complicated, as it introduces a second mechanism to construct 'Tracer's. While I could simply provide two constructors in the 'Tracer' class, this would make for an ugly and dangerous implementation; after all, the life cycle of a tracer configured explicitly is noticeably different from the life cycle of a tracer configured by sourcing environment variables. Instead, I’ve changed 'Tracer' to be an interface implemented by 'ExplicitlyConfiguredTracer' and 'EnvironmentConfiguredTracer'. This is an API-breaking change.
Diffstat (limited to 'bindings/java/examples')
-rw-r--r--bindings/java/examples/src/com/galois/ppaml/tracer/examples/Simple.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bindings/java/examples/src/com/galois/ppaml/tracer/examples/Simple.java b/bindings/java/examples/src/com/galois/ppaml/tracer/examples/Simple.java
index a698573..f4a6b99 100644
--- a/bindings/java/examples/src/com/galois/ppaml/tracer/examples/Simple.java
+++ b/bindings/java/examples/src/com/galois/ppaml/tracer/examples/Simple.java
@@ -3,6 +3,7 @@
package com.galois.ppaml.tracer.examples;
+import com.galois.ppaml.tracer.ExplicitlyConfiguredTracer;
import com.galois.ppaml.tracer.Phase;
import com.galois.ppaml.tracer.Tracer;
@@ -72,7 +73,7 @@ public class Simple {
public static void main(String[] args) {
// Start ppamltracer.
- Tracer tracer = new Tracer("/tmp/simple_report");
+ Tracer tracer = new ExplicitlyConfiguredTracer("/tmp/simple_report");
// Run the app.
(new Simple()).go(tracer);