public Node representData(Object data) { Class<?> type = data.getClass().getComponentType(); if (byte.class == type) { return representSequence(Tag.SEQ, asByteList(data), DumperOptions.FlowStyle.AUTO); } else if (short.class == type) { return representSequence(Tag.SEQ, asShortList(data), DumperOptions.FlowStyle.AUTO); } else if (int.class == type) { return representSequence(Tag.SEQ, asIntList(data), DumperOptions.FlowStyle.AUTO); } else if (long.class == type) { return representSequence(Tag.SEQ, asLongList(data), DumperOptions.FlowStyle.AUTO); } else if (float.class == type) { return representSequence(Tag.SEQ, asFloatList(data), DumperOptions.FlowStyle.AUTO); } else if (double.class == type) { return representSequence(Tag.SEQ, asDoubleList(data), DumperOptions.FlowStyle.AUTO); } else if (char.class == type) { return representSequence(Tag.SEQ, asCharList(data), DumperOptions.FlowStyle.AUTO); } else if (boolean.class == type) { return representSequence(Tag.SEQ, asBooleanList(data), DumperOptions.FlowStyle.AUTO); } throw new YAMLException("Unexpected primitive '" + type.getCanonicalName() + "'"); }
public Node representData(Object data) { Class<?> type = data.getClass().getComponentType(); if (byte.class == type) { return representSequence(Tag.SEQ, asByteList(data), null); } else if (short.class == type) { return representSequence(Tag.SEQ, asShortList(data), null); } else if (int.class == type) { return representSequence(Tag.SEQ, asIntList(data), null); } else if (long.class == type) { return representSequence(Tag.SEQ, asLongList(data), null); } else if (float.class == type) { return representSequence(Tag.SEQ, asFloatList(data), null); } else if (double.class == type) { return representSequence(Tag.SEQ, asDoubleList(data), null); } else if (char.class == type) { return representSequence(Tag.SEQ, asCharList(data), null); } else if (boolean.class == type) { return representSequence(Tag.SEQ, asBooleanList(data), null); } throw new YAMLException("Unexpected primitive '" + type.getCanonicalName() + "'"); }
public Node representData(Object data) { Class<?> type = data.getClass().getComponentType(); if (byte.class == type) { return representSequence(Tag.SEQ, asByteList(data), DumperOptions.FlowStyle.AUTO); } else if (short.class == type) { return representSequence(Tag.SEQ, asShortList(data), DumperOptions.FlowStyle.AUTO); } else if (int.class == type) { return representSequence(Tag.SEQ, asIntList(data), DumperOptions.FlowStyle.AUTO); } else if (long.class == type) { return representSequence(Tag.SEQ, asLongList(data), DumperOptions.FlowStyle.AUTO); } else if (float.class == type) { return representSequence(Tag.SEQ, asFloatList(data), DumperOptions.FlowStyle.AUTO); } else if (double.class == type) { return representSequence(Tag.SEQ, asDoubleList(data), DumperOptions.FlowStyle.AUTO); } else if (char.class == type) { return representSequence(Tag.SEQ, asCharList(data), DumperOptions.FlowStyle.AUTO); } else if (boolean.class == type) { return representSequence(Tag.SEQ, asBooleanList(data), DumperOptions.FlowStyle.AUTO); } throw new YAMLException("Unexpected primitive '" + type.getCanonicalName() + "'"); }
public Node representData(Object data) { Class<?> type = data.getClass().getComponentType(); if (byte.class == type) { return representSequence(Tag.SEQ, asByteList(data), null); } else if (short.class == type) { return representSequence(Tag.SEQ, asShortList(data), null); } else if (int.class == type) { return representSequence(Tag.SEQ, asIntList(data), null); } else if (long.class == type) { return representSequence(Tag.SEQ, asLongList(data), null); } else if (float.class == type) { return representSequence(Tag.SEQ, asFloatList(data), null); } else if (double.class == type) { return representSequence(Tag.SEQ, asDoubleList(data), null); } else if (char.class == type) { return representSequence(Tag.SEQ, asCharList(data), null); } else if (boolean.class == type) { return representSequence(Tag.SEQ, asBooleanList(data), null); } throw new YAMLException("Unexpected primitive '" + type.getCanonicalName() + "'"); }