@Override public HollowMapSchema getSchema() { return dataAccess.getSchema(); }
@Override public HollowMapSchema getSchema() { return dataAccess.getSchema(); }
@Override public HollowMapSchema getSchema() { return currentDataAccess().getSchema(); }
private void appendMapStringify(Writer writer, HollowDataAccess dataAccess, HollowMapTypeDataAccess typeDataAccess, int ordinal, int indentation) throws IOException { HollowMapSchema schema = typeDataAccess.getSchema(); if(showTypes) writer.append("(").append(schema.getName()).append(")"); if(showOrdinals) writer.append(" (ordinal ").append(Integer.toString(ordinal)).append(")"); indentation++; String keyType = schema.getKeyType(); String valueType = schema.getValueType(); HollowMapEntryOrdinalIterator iter = typeDataAccess.ordinalIterator(ordinal); while(iter.next()) { writer.append(NEWLINE); appendIndentation(writer, indentation); writer.append("k: "); appendStringify(writer, dataAccess, keyType, iter.getKey(), indentation); writer.append(NEWLINE); appendIndentation(writer, indentation); writer.append("v: "); appendStringify(writer, dataAccess, valueType, iter.getValue(), indentation); } }
private void appendMapStringify(Writer writer, HollowDataAccess dataAccess, HollowMapTypeDataAccess typeDataAccess, int ordinal, int indentation) throws IOException { HollowMapSchema schema = typeDataAccess.getSchema();
private List<Field> createMapFields(HollowEffigy effigy) { List<Field> fields = new ArrayList<Field>(); HollowMapTypeDataAccess typeDataAccess = (HollowMapTypeDataAccess)effigy.dataAccess; HollowMapSchema schema = typeDataAccess.getSchema(); HollowMapEntryOrdinalIterator iter = typeDataAccess.ordinalIterator(effigy.ordinal); while(iter.next()) { HollowEffigy entryEffigy = new HollowEffigy("Map.Entry"); entryEffigy.add(new Field("key", effigy(typeDataAccess.getDataAccess(), schema.getKeyType(), iter.getKey()))); entryEffigy.add(new Field("value", effigy(typeDataAccess.getDataAccess(), schema.getValueType(), iter.getValue()))); fields.add(new Field("entry", "Map.Entry", entryEffigy)); } return fields; }
HollowMapTypeDataAccess mapAccess = (HollowMapTypeDataAccess)typeDataAccess; boolean isValue = fieldIdentifier.getParents().get(level + 1).getViaFieldName().equals("value"); String childType = isValue ? mapAccess.getSchema().getValueType() : mapAccess.getSchema().getKeyType(); childDataAccess = typeDataAccess.getDataAccess().getTypeDataAccess(childType); for(int i=0;i<ordinals.size();i++) {