import org.eclipse.tracecompass.common.core.NonNullUtils;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-import org.eclipse.tracecompass.tmf.core.event.aspect.TmfEventFieldAspect;
+import org.eclipse.tracecompass.tmf.core.event.aspect.TmfContentFieldAspect;
import com.google.common.collect.ImmutableList;
NonNullUtils.checkNotNull(ImmutableList.of(
ITmfEventAspect.BaseAspects.TIMESTAMP,
new BtfSourceAspect(),
- new BtfSourceInstanceAspect(),
+ new TmfContentFieldAspect(BtfColumnNames.SOURCE_INSTANCE.toString(), BtfColumnNames.SOURCE_INSTANCE.toString()),
ITmfEventAspect.BaseAspects.EVENT_TYPE,
new BtfTargetAspect(),
- new BtfTargetInstanceAspect(),
- new BtfEventAspect(),
- new BtfNotesAspect()
+ new TmfContentFieldAspect(BtfColumnNames.TARGET_INSTANCE.toString(), BtfColumnNames.TARGET_INSTANCE.toString()),
+ new TmfContentFieldAspect(BtfColumnNames.EVENT.toString(), BtfColumnNames.EVENT.toString()),
+ new TmfContentFieldAspect(BtfColumnNames.NOTES.toString(), BtfColumnNames.NOTES.toString())
));
/**
}
}
- /**
- * The "source instance" aspect, whose value comes from the field of the
- * same name.
- */
- private static class BtfSourceInstanceAspect extends TmfEventFieldAspect {
- public BtfSourceInstanceAspect() {
- super(BtfColumnNames.SOURCE_INSTANCE.toString(),
- BtfColumnNames.SOURCE_INSTANCE.toString());
- }
- }
-
/**
* The "target" aspect, taking its value from
* {@link ITmfEvent#getReference()}.
}
}
- /**
- * The "target instance" aspect, whose value comes from the field of the
- * same name.
- */
- private static class BtfTargetInstanceAspect extends TmfEventFieldAspect {
- public BtfTargetInstanceAspect() {
- super(BtfColumnNames.TARGET_INSTANCE.toString(),
- BtfColumnNames.TARGET_INSTANCE.toString());
- }
- }
-
- /**
- * The "event" aspect, whose value comes from the field of the same name.
- */
- private static class BtfEventAspect extends TmfEventFieldAspect {
- public BtfEventAspect() {
- super(BtfColumnNames.EVENT.toString(),
- BtfColumnNames.EVENT.toString());
- }
- }
-
- /**
- * The "notes" column, whose value comes from the field of the same name, if
- * present.
- */
- private static class BtfNotesAspect extends TmfEventFieldAspect {
- public BtfNotesAspect() {
- super(BtfColumnNames.NOTES.toString(),
- BtfColumnNames.NOTES.toString());
- }
- }
-
/**
* Return the event aspects defined for BTF traces.
*