} else if (fieldDef instanceof ArrayDefinition) {
ArrayDefinition arrayDef = (ArrayDefinition) fieldDef;
- if (arrayDef.isString()) {
+ if (arrayDef.getDeclaration().isString()) {
/* This is an array of UTF-8 bytes, a.k.a. a String! */
field = new CTFStringField(fieldName, fieldDef.toString());
*/
final class CTFIntegerField extends CtfTmfEventField {
- private final int base;
- private final boolean signed;
+ private final int fBase;
+ private final boolean fSigned;
/**
* A CTF "IntegerDefinition" can be an integer of any byte size, so in the
*/
CTFIntegerField(String name, long longValue, int base, boolean signed) {
super(name, longValue, null);
- this.signed = signed;
- this.base = base;
+ fSigned = signed;
+ fBase = base;
}
@Override
@Override
public String getFormattedValue() {
- return IntegerDefinition.formatNumber(getValue(), base, signed);
+ return IntegerDefinition.formatNumber(getValue(), fBase, fSigned);
}
}
*/
final class CTFIntegerArrayField extends CtfTmfEventField {
- private final int base;
- private final boolean signed;
- private String formattedValue = null;
+ private final int fBase;
+ private final boolean fSigned;
+ private String fFormattedValue = null;
/**
* Constructor for CTFIntegerArrayField.
*/
CTFIntegerArrayField(String name, long[] longValues, int base, boolean signed) {
super(name, longValues, null);
- this.base = base;
- this.signed = signed;
+ fBase = base;
+ fSigned = signed;
}
@Override
@Override
public synchronized String getFormattedValue() {
- if (formattedValue == null) {
+ if (fFormattedValue == null) {
List<String> strings = new ArrayList<>();
for (long value : getValue()) {
- strings.add(IntegerDefinition.formatNumber(value, base, signed));
+ strings.add(IntegerDefinition.formatNumber(value, fBase, fSigned));
}
- formattedValue = strings.toString();
+ fFormattedValue = strings.toString();
}
- return formattedValue;
+ return fFormattedValue;
}
}
*/
final class CTFArrayField extends CtfTmfEventField {
- private String formattedValue = null;
+ private String fFormattedValue = null;
/**
* Constructor for CTFArrayField.
@Override
public synchronized String getFormattedValue() {
- if (formattedValue == null) {
+ if (fFormattedValue == null) {
List<String> strings = new ArrayList<>();
for (CtfTmfEventField element : getValue()) {
strings.add(element.getFormattedValue());
}
- formattedValue = strings.toString();
+ fFormattedValue = strings.toString();
}
- return formattedValue;
+ return fFormattedValue;
}
}