congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • BoxLayout (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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