tmf: Do not define base aspects in the interface
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.tmf.ctf.core / src / org / eclipse / tracecompass / tmf / ctf / core / trace / CtfTmfTrace.java
index 03bb239088d7f135f56f17db56b8379b9be9d78f..52fb5e7b520dd2d214b06bfead0ba0c5f58300e2 100644 (file)
@@ -46,11 +46,11 @@ import org.eclipse.tracecompass.internal.tmf.ctf.core.trace.iterator.CtfIterator
 import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
 import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
 import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
+import org.eclipse.tracecompass.tmf.core.event.aspect.TmfBaseAspects;
 import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
 import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.tracecompass.tmf.core.project.model.ITmfPropertiesProvider;
 import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.tracecompass.tmf.core.timestamp.TmfNanoTimestamp;
 import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
 import org.eclipse.tracecompass.tmf.core.trace.ITmfTraceWithPreDefinedEvents;
@@ -106,11 +106,11 @@ public class CtfTmfTrace extends TmfTrace
      */
     protected static final @NonNull Collection<@NonNull ITmfEventAspect<?>> CTF_ASPECTS =
             ImmutableList.of(
-                    ITmfEventAspect.BaseAspects.TIMESTAMP,
+                    TmfBaseAspects.getTimestampAspect(),
                     new CtfChannelAspect(),
                     new CtfCpuAspect(),
-                    ITmfEventAspect.BaseAspects.EVENT_TYPE,
-                    ITmfEventAspect.BaseAspects.CONTENTS
+                    TmfBaseAspects.getEventTypeAspect(),
+                    TmfBaseAspects.getContentsAspect()
                     );
 
     /**
@@ -626,8 +626,8 @@ public class CtfTmfTrace extends TmfTrace
      * @since 1.0
      */
     @Override
-    public @NonNull TmfNanoTimestamp createTimestamp(long ts) {
-        return new TmfNanoTimestamp(getTimestampTransform().transform(ts));
+    public @NonNull ITmfTimestamp createTimestamp(long ts) {
+        return TmfTimestamp.fromNanos(getTimestampTransform().transform(ts));
     }
 
     private static int fCheckpointSize = -1;
@@ -635,7 +635,7 @@ public class CtfTmfTrace extends TmfTrace
     @Override
     public synchronized int getCheckpointSize() {
         if (fCheckpointSize == -1) {
-            TmfCheckpoint c = new TmfCheckpoint(new TmfNanoTimestamp(0), new CtfLocation(0, 0), 0);
+            TmfCheckpoint c = new TmfCheckpoint(TmfTimestamp.fromNanos(0), new CtfLocation(0, 0), 0);
             ByteBuffer b = ByteBuffer.allocate(ITmfCheckpoint.MAX_SERIALIZE_SIZE);
             b.clear();
             c.serialize(b);
This page took 0.028095 seconds and 5 git commands to generate.