# HG changeset patch # User Michael Van De Vanter # Date 1444407478 14400 # Node ID 145f995cd2fe236f65b53f36c41eeb420333647b # Parent 9c108011f794735ab27772ae3e718d17ef51bf0f Truffle/Instrumentation: some minor access cleanups diff -r 9c108011f794 -r 145f995cd2fe truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java Thu Oct 08 17:33:41 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java Fri Oct 09 12:17:58 2015 -0400 @@ -44,7 +44,7 @@ private boolean isDisposed = false; - protected Instrument(String instrumentInfo) { + Instrument(String instrumentInfo) { this.instrumentInfo = instrumentInfo; } @@ -68,10 +68,10 @@ return isDisposed; } - protected final String getInstrumentInfo() { + public final String getInstrumentInfo() { return instrumentInfo; } - protected abstract void innerDispose(); + abstract void innerDispose(); } diff -r 9c108011f794 -r 145f995cd2fe truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/TagInstrument.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/TagInstrument.java Thu Oct 08 17:33:41 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/TagInstrument.java Fri Oct 09 12:17:58 2015 -0400 @@ -41,7 +41,7 @@ */ public abstract class TagInstrument extends Instrument { - protected Instrumenter instrumenter; + private Instrumenter instrumenter; private SyntaxTag tag = null; @@ -51,10 +51,14 @@ this.tag = tag; } - public SyntaxTag getTag() { + public final SyntaxTag getTag() { return tag; } + protected final Instrumenter getInstrumenter() { + return instrumenter; + } + static final class BeforeTagInstrument extends TagInstrument { private final StandardBeforeInstrumentListener listener; @@ -70,7 +74,7 @@ @Override protected void innerDispose() { - instrumenter.disposeBeforeTagInstrument(); + getInstrumenter().disposeBeforeTagInstrument(); } } @@ -89,7 +93,7 @@ @Override protected void innerDispose() { - instrumenter.disposeAfterTagInstrument(); + getInstrumenter().disposeAfterTagInstrument(); } } }