mainPlugin/src/main/java/org/simpleyaml/configuration/file/YamlFile.java
/**
     * Parse comments from a string.
     *
     * @param contents Contents of a Configuration to parse.
     * @return a comment mapper with comments parsed
     * @throws InvalidConfigurationException if it hasn't been possible to read the contents
     */
Parse comments from a string.
@param contents Contents of a Configuration to parse.
@return a comment mapper with comments parsed
@throws InvalidConfigurationException if it hasn't been possible to read the contents
Parse comments from a string . @param contents Contents of a Configuration to parse . @return a comment mapper with comments parsed @throws InvalidConfigurationException if it hasn ' t been possible to read the contents
private YamlCommentMapper parseComments(final String contents) throws InvalidConfigurationException {
        try {
            if (contents != null) {
                this.yamlCommentMapper = new YamlCommentParser(options(), new StringReader(contents));
                ((YamlCommentParser) this.yamlCommentMapper).parse();
            } else {
                this.yamlCommentMapper = new YamlCommentMapper(options());
            }
            return this.yamlCommentMapper;
        } catch (IOException e) {
            throw new InvalidConfigurationException(e);
        }
    }
private YamlCommentMapper parseComments ( final String contents ) throws InvalidConfigurationException { try { if ( contents != null ) { this . yamlCommentMapper = new YamlCommentParser ( options ( ) , new StringReader ( contents ) ) ; ( ( YamlCommentParser ) this . yamlCommentMapper ) . parse ( ) ; } else { this . yamlCommentMapper = new YamlCommentMapper ( options ( ) ) ; } return this . yamlCommentMapper ; } catch ( IOException e ) { throw new InvalidConfigurationException ( e ) ; } }
Parse comments from a string.
Parse comments from a string .