vm: change private method to take a List instead of ArrayList
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / internal / ctf / core / event / LostEventDeclaration.java
1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
11
12 package org.eclipse.tracecompass.internal.ctf.core.event;
13
14 import java.util.Collections;
15 import java.util.Set;
16
17 import org.eclipse.tracecompass.ctf.core.CTFException;
18 import org.eclipse.tracecompass.ctf.core.CTFStrings;
19 import org.eclipse.tracecompass.ctf.core.event.IEventDeclaration;
20 import org.eclipse.tracecompass.ctf.core.event.io.BitBuffer;
21 import org.eclipse.tracecompass.ctf.core.event.types.IntegerDeclaration;
22 import org.eclipse.tracecompass.ctf.core.event.types.StructDeclaration;
23 import org.eclipse.tracecompass.ctf.core.trace.CTFStreamInputReader;
24 import org.eclipse.tracecompass.ctf.core.trace.ICTFStream;
25
26 /**
27 * A lost event definition
28 *
29 * @author Matthew Khouzam
30 * @since 1.0
31 */
32 public class LostEventDeclaration implements IEventDeclaration {
33
34 /**
35 * Id of lost events
36 *
37 * @since 1.0
38 */
39 public static final long LOST_EVENT_ID = -1L;
40
41 /**
42 * Gets a "lost" event. This is a synthetic event that is there to show that
43 * there should be something there.
44 */
45 public static final LostEventDeclaration INSTANCE = new LostEventDeclaration();
46
47 private final StructDeclaration fFields = new StructDeclaration(0);
48
49 private LostEventDeclaration() {
50 getFields().addField(CTFStrings.LOST_EVENTS_FIELD, IntegerDeclaration.UINT_32B_DECL);
51 getFields().addField(CTFStrings.LOST_EVENTS_DURATION, IntegerDeclaration.UINT_64B_DECL);
52 }
53
54 @Override
55 public EventDefinition createDefinition(CTFStreamInputReader streamInputReader, BitBuffer input, long timestamp) throws CTFException {
56 return null;
57 }
58
59 @Override
60 public String getName() {
61 return CTFStrings.LOST_EVENT_NAME;
62 }
63
64 @Override
65 public StructDeclaration getFields() {
66 return fFields;
67 }
68
69 @Override
70 public StructDeclaration getContext() {
71 return null;
72 }
73
74 @Override
75 public Long getId() {
76 return LOST_EVENT_ID;
77 }
78
79 /**
80 * @since 2.0
81 */
82 @Override
83 public ICTFStream getStream() {
84 return null;
85 }
86
87 @Override
88 public long getLogLevel() {
89 return 0;
90 }
91
92 @Override
93 public Set<String> getCustomAttributes() {
94 return Collections.<String> emptySet();
95 }
96
97 @Override
98 public String getCustomAttribute(String key) {
99 return null;
100 }
101
102 }
This page took 0.034716 seconds and 5 git commands to generate.