ctf: preserve byte order if explicitly set in a typedef
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / ctf / core / event / types / IntegerDeclaration.java
index df33768aa822f2c3cc7c8bbe600d935667064fdb..84e8c45211ad8794d1d7b70a36872a0b86cb6406 100644 (file)
@@ -120,6 +120,7 @@ public final class IntegerDeclaration extends Declaration implements ISimpleData
     private final int fLength;
     private final boolean fSigned;
     private final int fBase;
+    private final boolean fIsByteOrderSet;
     private final ByteOrder fByteOrder;
     private final Encoding fEncoding;
     private final long fAlignment;
@@ -243,6 +244,7 @@ public final class IntegerDeclaration extends Declaration implements ISimpleData
         fLength = len;
         fSigned = signed;
         fBase = base;
+        fIsByteOrderSet = byteOrder != null;
         fByteOrder = (byteOrder == null) ? ByteOrder.nativeOrder() : byteOrder;
         fEncoding = encoding;
         fClock = clock;
@@ -276,10 +278,14 @@ public final class IntegerDeclaration extends Declaration implements ISimpleData
     }
 
     /**
-     * Get the byte order
-     *
-     * @return the byte order
+     * @since 2.0
      */
+    @Override
+    public boolean isByteOrderSet() {
+        return fIsByteOrderSet;
+    }
+
+    @Override
     public ByteOrder getByteOrder() {
         return fByteOrder;
     }
This page took 0.031748 seconds and 5 git commands to generate.