private synchronized void initAMInfos() { if (this.amInfos != null) { return; } JobReportProtoOrBuilder p = viaProto ? proto : builder; List<AMInfoProto> list = p.getAmInfosList(); this.amInfos = new ArrayList<AMInfo>(); for (AMInfoProto amInfoProto : list) { this.amInfos.add(convertFromProtoFormat(amInfoProto)); } }
public AMInfoPBImpl() { builder = AMInfoProto.newBuilder(); }
public AMInfoPBImpl(AMInfoProto proto) { this.proto = proto; viaProto = true; }
public synchronized AMInfoProto getProto() { mergeLocalToProto(); proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
private synchronized void maybeInitBuilder() { if (viaProto || builder == null) { builder = AMInfoProto.newBuilder(proto); } viaProto = false; }
private AMInfoPBImpl convertFromProtoFormat(AMInfoProto p) { return new AMInfoPBImpl(p); }
private AMInfoProto convertToProtoFormat(AMInfo t) { return ((AMInfoPBImpl)t).getProto(); }