this exposes an internal map and can be dangerous
Change-Id: Icc1d5ecbd7d5dc5eab472b314669312ffe26a8a6
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/64118
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
return fFieldMap.containsKey(name);
}
- /**
- * Get the fields of the struct as a map.
- *
- * @return a Map of the fields (key is the name)
- */
- public Map<String, IDeclaration> getFields() {
- return fFieldMap;
- }
-
/**
* Get the field declaration corresponding to a field name.
*
case CTFParser.STRUCT:
declaration = StructParser.INSTANCE.parse(firstChild, new StructParser.Param(trace, identifier, scope));
StructDeclaration structDeclaration = (StructDeclaration) declaration;
- IDeclaration idEnumDecl = structDeclaration.getFields().get("id"); //$NON-NLS-1$
+ IDeclaration idEnumDecl = structDeclaration.getField("id"); //$NON-NLS-1$
if (idEnumDecl instanceof EnumDeclaration) {
EnumDeclaration enumDeclaration = (EnumDeclaration) idEnumDecl;
ByteOrder bo = enumDeclaration.getContainerType().getByteOrder();
decl.isSigned(), decl.getBase(), byteOrder,
decl.getEncoding(), decl.getClock(),
decl.getAlignment());
- sd.getFields().put(s, newI);
+ sd.addField(s, newI);
}
}
}