public void setIndicatorIndent(int indicatorIndent) { if (indicatorIndent < 0) { throw new YAMLException("Indicator indent must be non-negative."); } if (indicatorIndent > Emitter.MAX_INDENT - 1) { throw new YAMLException("Indicator indent must be at most Emitter.MAX_INDENT-1: " + (Emitter.MAX_INDENT - 1)); } this.indicatorIndent = indicatorIndent; }
public YAMLException(JsonParser p, org.yaml.snakeyaml.error.YAMLException src) { super(p, src.getMessage(), src); }
public int getIndex() { return _source.getIndex(); } }
public int getLine() { return _source.getLine(); }
public int getColumn() { return _source.getColumn(); }
public String getProblem() { return _source.getProblem(); }
public String get_snippet(int indent, int max_length) { return _source.get_snippet(indent, max_length); }
public String getContext() { return _source.getContext(); }
public String getName() { return _source.getName(); }
public Mark getMark() { return new Mark(name, this.index, this.line, this.column, this.dataWindow, this.pointer); }
@Override public String getMessage() { return toString(); }
public Mark(String name, int index, int line, int column, char[] str, int pointer) { this(name, index, line, column, toCodePoints(str), pointer); }
public Token(Mark startMark, Mark endMark) { if (startMark == null || endMark == null) { throw new YAMLException("Token requires marks."); } this.startMark = startMark; this.endMark = endMark; }
public String get_snippet() { return get_snippet(4, 75); }
public void setIndent(int indent) { if (indent < Emitter.MIN_INDENT) { throw new YAMLException("Indent must be at least " + Emitter.MIN_INDENT); } if (indent > Emitter.MAX_INDENT) { throw new YAMLException("Indent must be at most " + Emitter.MAX_INDENT); } this.indent = indent; }
public String get_snippet() { return _source.get_snippet(); }
public static ScalarStyle createStyle(Character style) { if (style == null) { return PLAIN; } else { switch (style) { case '"': return DOUBLE_QUOTED; case '\'': return SINGLE_QUOTED; case '|': return LITERAL; case '>': return FOLDED; default: throw new YAMLException("Unknown scalar style character: " + style); } } } }
public static String decode(String buff) { try { return URLDecoder.decode(buff, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new YAMLException(e); } } }
@Override public Object get(Object object) { try { return field.get(object); } catch (Exception e) { throw new YAMLException("Unable to access field " + field.getName() + " on object " + object + " : " + e); } }
protected Object newInstance(Node node) { try { return newInstance(Object.class, node); } catch (InstantiationException e) { throw new YAMLException(e); } }