aboutsummaryrefslogtreecommitdiff
path: root/bindings/java/src/java/com/galois/ppaml/tracer/Phase.java
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/src/java/com/galois/ppaml/tracer/Phase.java
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/src/java/com/galois/ppaml/tracer/Phase.java')
-rw-r--r--bindings/java/src/java/com/galois/ppaml/tracer/Phase.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/bindings/java/src/java/com/galois/ppaml/tracer/Phase.java b/bindings/java/src/java/com/galois/ppaml/tracer/Phase.java
index 23ed2f4..019704f 100644
--- a/bindings/java/src/java/com/galois/ppaml/tracer/Phase.java
+++ b/bindings/java/src/java/com/galois/ppaml/tracer/Phase.java
@@ -27,9 +27,9 @@ package com.galois.ppaml.tracer;
public final class Phase extends CWrapper {
/**
- * The <code>Tracer</code> this phase is associated with.
+ * The <code>TracerCWrapper</code> this phase is associated with.
*/
- private final Tracer tracer;
+ private final TracerCWrapper tracer;
/**
* The name of the phase.
@@ -38,14 +38,14 @@ public final class Phase extends CWrapper {
/**
* Creates and initializes a <code>Phase</code>. You should not call this;
- * call {@link Tracer.createPhase} instead.
+ * call <code>Tracer.createPhase</code> instead.
*
- * @param tracer the {@link Tracer} to associate the <code>Phase</code>
- * with.
+ * @param tracer the {@link TracerCWrapper} to associate the
+ * <code>Phase</code> with.
*
* @param name the name of the phase.
*/
- protected Phase(Tracer tracer, final String name) {
+ protected Phase(TracerCWrapper tracer, final String name) {
this.tracer = tracer;
this.name = name;
super.open();