-
Notifications
You must be signed in to change notification settings - Fork 10
/
JsonFieldClassAliasMetadataNode.java
72 lines (64 loc) · 2.09 KB
/
JsonFieldClassAliasMetadataNode.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*******************************************************************************
* Copyright (c) 2023 Ericsson
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Sehr Moosabhoy - Initial implementation
*******************************************************************************/
package org.eclipse.tracecompass.internal.ctf.core.event.metadata;
import org.eclipse.tracecompass.internal.ctf.core.event.types.ICTFMetadataNode;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
/**
* Node to store the field class alias fragment of JSON Metadata for CTF2 traces
*
* @author Sehr Moosabhoy
*
*/
public class JsonFieldClassAliasMetadataNode extends CTFJsonMetadataNode {
@SerializedName("name")
private final String fName;
@SerializedName("field-class")
private final FieldClass fFieldClass;
/**
* Constructor for a JsonFieldClassAliasMetadataNode
*
* @param parent
* the parent of the new node
* @param type
* the type of the new node
* @param value
* the value of the new node
* @param name
* the name of the field class alias
* @param fieldClass
* the field class described by this new node
*/
public JsonFieldClassAliasMetadataNode(ICTFMetadataNode parent, String type, String value, String name, FieldClass fieldClass) {
super(parent, type, value);
this.fName = name;
this.fFieldClass = fieldClass;
}
/**
* Get the name of the field class alias
*
* @return the name
*/
public String getName() {
return fName;
}
/**
* Get the field class of the field class alias
*
* @return the field class
*/
public JsonObject getFieldClass() {
return fFieldClass.getFieldClass();
}
}