Class Flowifier


  • public class Flowifier
    extends Object
    Main class of the flowifier used to convert a whole document or the content of a node into a Java class
    Author:
    Julien Gouesse
    • Constructor Detail

      • Flowifier

        public Flowifier()
        Constructor
    • Method Detail

      • toFlow

        public <T extends Appendable> T toFlow​(org.jsoup.nodes.Node node,
                                               HtmlToJavaHtmlFlowNodeVisitor<T> htmlToJavaHtmlFlowNodeVisitor)
        Returns the Java source code of a class that generates the HTML source code of the given node
        Type Parameters:
        T - the type of appendable used to store the Java source code
        Parameters:
        node - the node whose content has to be converted
        htmlToJavaHtmlFlowNodeVisitor - the visitor that performs the conversion
        Returns:
        the Java source code of a class that generates the HTML source code of the given node
      • toFlow

        public <T extends Appendable> T toFlow​(org.jsoup.nodes.Document doc,
                                               HtmlToJavaHtmlFlowNodeVisitor<T> htmlToJavaHtmlFlowNodeVisitor)
        Returns the Java source code of a class that generates the HTML source code of the given document
        Type Parameters:
        T - the type of appendable used to store the Java source code
        Parameters:
        doc - the document whose content has to be converted
        htmlToJavaHtmlFlowNodeVisitor - the visitor that performs the conversion
        Returns:
        the Java source code of a class that generates the HTML source code of the given document
      • toFlow

        public String toFlow​(org.jsoup.nodes.Document doc)
        Returns the Java source code of a class that generates the HTML source code of the given document
        Parameters:
        doc - the document whose content has to be converted
        Returns:
        the Java source code of a class that generates the HTML source code of the given document
      • toFlow

        public <T extends Appendable> T toFlow​(String url,
                                               HtmlToJavaHtmlFlowNodeVisitor<T> htmlToJavaHtmlFlowNodeVisitor)
                                        throws IOException
        Returns the Java source code of a class that generates the HTML source code of the document at the given URL
        Type Parameters:
        T - the type of appendable used to store the Java source code
        Parameters:
        url - the URL of the document
        htmlToJavaHtmlFlowNodeVisitor - the visitor that performs the conversion
        Returns:
        the Java source code of a class that generates the HTML source code of the document at the given URL
        Throws:
        IOException - thrown when something wrong occurs while getting the document at the given URL
      • toFlow

        public String toFlow​(String url)
                      throws IOException
        Returns the Java source code of a class that generates the HTML source code of the document at the given URL
        Parameters:
        url - the URL of the document
        Returns:
        the Java source code of a class that generates the HTML source code of the document at the given URL
        Throws:
        IOException - thrown when something wrong occurs while getting the document at the given URL
      • fromHtml

        public static String fromHtml​(String src)
        Returns the Java source code of a class that generates the HTML source code of the given source.
        Parameters:
        src - the HTML whose content has to be converted
        Returns:
        the Java source code of a class that generates the HTML source code of the given source.