Codota Logo
Reader
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
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

  • Making http post requests using okhttp
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now