Package htmlflow.flowifier
Interface HtmlToJavaHtmlFlowNodeVisitor<T extends Appendable>
-
- Type Parameters:
T- the type of appendable used to store the Java source code
- All Superinterfaces:
org.jsoup.select.NodeVisitor
- All Known Implementing Classes:
AbstractHtmlToJavaHtmlFlowNodeVisitor,DefaultHtmlToJavaHtmlFlowNodeVisitor
public interface HtmlToJavaHtmlFlowNodeVisitor<T extends Appendable> extends org.jsoup.select.NodeVisitorVisitor of a JSoup node that converts the HTML source code into a Java class- Author:
- Julien Gouesse
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendAttribute(org.jsoup.nodes.Attribute attribute, Class<?> nodeClass)Appends the attribute value and keyvoidappendFooter()Appends the footer of the Java class, i.e closes the method and the classvoidappendHeader()Appends the header of the Java class, i.e the imports, the declaration of the class, the declaration of the method, ...StringconvertJavaStringContentToJavaDeclarableString(String javaStringContent)Converts the content of a Java string into a string that can be declared in a Java class passed as a method parameterTgetAppendable()Returns the appendable used to store the Java classClass<?>getClassFromNodeName(String nodeName)Returns the class of the node whose name is passed if any, otherwisenullMethodgetMethodFromAttribute(Class<?> nodeClass, org.jsoup.nodes.Attribute attribute)Returns the method of the class node that matches with the attribute if any, otherwisenullbooleanisUncloseable(org.jsoup.nodes.Node node)Tells whether a JSoup node cannot be closed
-
-
-
Method Detail
-
appendHeader
void appendHeader() throws IOExceptionAppends the header of the Java class, i.e the imports, the declaration of the class, the declaration of the method, ...- Throws:
IOException- thrown when something wrong occurs while appending the Java source code
-
appendFooter
void appendFooter() throws IOExceptionAppends the footer of the Java class, i.e closes the method and the class- Throws:
IOException- thrown when something wrong occurs while appending the Java source code
-
appendAttribute
void appendAttribute(org.jsoup.nodes.Attribute attribute, Class<?> nodeClass) throws IOExceptionAppends the attribute value and key- Parameters:
attribute- the attributenodeClass- the class of the node- Throws:
IOException- thrown when something wrong occurs while appending the Java source code
-
isUncloseable
boolean isUncloseable(org.jsoup.nodes.Node node)
Tells whether a JSoup node cannot be closed- Parameters:
node- the JSoup node- Returns:
trueif the JSoup node cannot be closed, otherwisefalse
-
convertJavaStringContentToJavaDeclarableString
String convertJavaStringContentToJavaDeclarableString(String javaStringContent)
Converts the content of a Java string into a string that can be declared in a Java class passed as a method parameter- Parameters:
javaStringContent- the content of a Java string- Returns:
- a string that can be declared in a Java class passed as a method parameter
-
getAppendable
T getAppendable()
Returns the appendable used to store the Java class- Returns:
- the appendable used to store the Java class
-
getClassFromNodeName
Class<?> getClassFromNodeName(String nodeName)
Returns the class of the node whose name is passed if any, otherwisenull- Parameters:
nodeName- the node name- Returns:
- the class of the node whose name is passed if any, otherwise
null
-
getMethodFromAttribute
Method getMethodFromAttribute(Class<?> nodeClass, org.jsoup.nodes.Attribute attribute)
Returns the method of the class node that matches with the attribute if any, otherwisenull- Parameters:
nodeClass- the class of the nodeattribute- the attribute- Returns:
- the method of the class node that matches with the attribute if
any, otherwise
null
-
-