congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Reader
Code IndexAdd Tabnine to your IDE (free)

How to use
Reader
in
org.asciidoctor.extension

Best Java code snippets using org.asciidoctor.extension.Reader (Showing top 11 results out of 315)

origin: asciidoctor/asciidoctorj

  @Override
  public Object process(StructuralNode parent, Reader reader,
      Map<String, Object> attributes) {

    List<String> lines = reader.lines();

    StringBuilder outputLines = new StringBuilder();
    outputLines.append("<pre class=\"arrows-and-boxes\">");

    for (String line : lines) {
      outputLines.append(line);
    }

    outputLines.append("</pre>");
    attributes.put("!subs", "");

    return null;
//        return createBlock(document, "pass", Arrays.asList(outputLines.toString()),
//                attributes, new HashMap<String, Object>() {
//                    {
//                        put("content_model", ":raw");
//                    }
//                });

  }
}
origin: asciidoctor/asciidoctorj

@Override
public Object process(                                 // <5>
    StructuralNode parent, Reader reader, Map<String, Object> attributes) {
  String content = reader.read();
  String yellContent = content.toUpperCase();
  return createBlock(parent, "paragraph", yellContent, attributes);
}
origin: asciidoctor/asciidoctorj

@Override
public Object process(StructuralNode parent, Reader reader, Map<String, Object> attributes) {
  List<String> lines = reader.readLines();
  String upperLines = null;
  for (String line : lines) {
    if (upperLines == null) {
      upperLines = line.toUpperCase();
    } else {
      upperLines = upperLines + "\n" + line.toUpperCase();
    }
  }
  return createBlock(parent, "paragraph", Arrays.asList(upperLines), attributes, new HashMap<>());
}
origin: org.asciidoctor/asciidoctorj

  public StructuralNode nextBlock() {
    if (!reader.hasMoreLines()) {
      return null;
    }
    IRubyObject nextBlock = getRubyProperty("next_block", reader, ((StructuralNodeImpl) parent).getRubyObject());
    if (nextBlock.isNil()) {
      return null;
    } else {
      return (StructuralNode) NodeConverter.createASTNode(nextBlock);
    }
  }
}
origin: asciidoctor/asciidoctorj

  public StructuralNode nextBlock() {
    if (!reader.hasMoreLines()) {
      return null;
    }
    IRubyObject nextBlock = getRubyProperty("next_block", reader, ((StructuralNodeImpl) parent).getRubyObject());
    if (nextBlock.isNil()) {
      return null;
    } else {
      return (StructuralNode) NodeConverter.createASTNode(nextBlock);
    }
  }
}
origin: asciidoctor/asciidoctorj

@Override
public Object process(StructuralNode parent, Reader reader, Map<String, Object> attributes) {
  List<String> lines = reader.readLines();
  String upperLines = null;
  for (String line : lines) {
    if (upperLines == null) {
      upperLines = line.toUpperCase();
    } else {
      upperLines = upperLines + "\n" + line.toUpperCase();
    }
  }
  return createBlock(parent, "paragraph", Arrays.asList(upperLines), attributes, new HashMap<>());
}
origin: asciidoctor/asciidoctorj

@Override
public Object process(StructuralNode parent, Reader reader, Map<String, Object> attributes) {
  List<String> lines = reader.readLines();
  String upperLines = null;
  for (String line : lines) {
    if (upperLines == null) {
      upperLines = line.toUpperCase();
    } else {
      upperLines = upperLines + "\n" + line.toUpperCase();
    }
  }
  return createBlock(parent, "paragraph", Arrays.asList(upperLines), attributes, new HashMap<Object, Object>());
}
origin: asciidoctor/asciidoctorj

  @Override
  public Object process(StructuralNode parent, Reader reader, Map<String, Object> attributes) {
    List<String> s = reader.readLines().stream()
      .map(line -> 
        line.chars()
          .mapToObj(c -> Character.toString((char) c))
          .collect(joining(" ")))
      .collect(toList());
    return createBlock(parent, "paragraph", s);
  }
}
origin: asciidoctor/asciidoctorj

  @Override
  public Object process(StructuralNode parent, Reader reader, Map<String, Object> attributes) {
    List<String> s = reader.readLines().stream()
      .map(line ->
        line.chars()
          .mapToObj(c -> Character.toString((char) c))
          .collect(joining(" ")))
      .collect(toList());
    return createBlock(parent, "paragraph", s);
  }
}
origin: asciidoctor/asciidoctorj

@Override
public Object process(StructuralNode parent, Reader reader, Map<String, Object> attributes) {
  assertSame(asciidoctor, unwrap(Asciidoctor.class));
  List<String> processed = reader.readLines().stream()
    .map(String::toLowerCase)
    .collect(Collectors.toList());
  return createBlock(parent, "paragraph", processed, attributes, new HashMap<>());
}
origin: asciidoctor/asciidoctorj

  @Override
  public Object process(StructuralNode parent, Reader reader, Map<String, Object> attributes) {
    log(new LogRecord(Severity.INFO, parent.getSourceLocation(), "Hello Log"));
    final List<String> strings = reader.readLines().stream()
      .map(String::toUpperCase)
      .collect(Collectors.toList());
    return createBlock(parent, "paragraph", strings);
  }
}
org.asciidoctor.extensionReader

Most used methods

  • hasMoreLines
    Check whether there are any lines left to read. If a previous call to this method resulted in a valu
  • lines
  • read
    Get the remaining lines of source data joined as a String. Delegates to Reader#read_lines, then join
  • readLines
    Get the remaining lines of source data. This method calls Reader#read_line repeatedly until all line

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now