jodd.lagarto.htmlstapler
Class HtmlStaplerTagAdapter

java.lang.Object
  extended by jodd.lagarto.TagAdapter
      extended by jodd.lagarto.htmlstapler.HtmlStaplerTagAdapter
All Implemented Interfaces:
TagVisitor

public class HtmlStaplerTagAdapter
extends TagAdapter

HTML Stapler tag adapter parses HTML page and collects all information about linking resource files.


Field Summary
protected  HtmlStaplerBundlesManager bundlesManager
           
protected  BundleAction cssBundleAction
           
protected  boolean insideConditionalComment
           
protected  BundleAction jsBundleAction
           
 
Fields inherited from class jodd.lagarto.TagAdapter
target
 
Constructor Summary
HtmlStaplerTagAdapter(HtmlStaplerBundlesManager bundlesManager, java.lang.String servletPath, TagVisitor target)
           
 
Method Summary
 void condComment(java.lang.CharSequence expression, boolean isStartingTag, boolean isHidden, java.lang.CharSequence comment)
          Invoked on IE conditional comment.
 void end()
          Invoked at the end, after all content is visited.
 char[] postProcess(char[] content)
          Post process final content.
 void script(Tag tag, java.lang.CharSequence body)
          Invoked on script tag.
 void tag(Tag tag)
          Invoked on tag (open, close or empty).
 
Methods inherited from class jodd.lagarto.TagAdapter
cdata, comment, doctype, error, getTarget, start, style, text, xml, xmp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundlesManager

protected final HtmlStaplerBundlesManager bundlesManager

jsBundleAction

protected final BundleAction jsBundleAction

cssBundleAction

protected final BundleAction cssBundleAction

insideConditionalComment

protected boolean insideConditionalComment
Constructor Detail

HtmlStaplerTagAdapter

public HtmlStaplerTagAdapter(HtmlStaplerBundlesManager bundlesManager,
                             java.lang.String servletPath,
                             TagVisitor target)
Method Detail

script

public void script(Tag tag,
                   java.lang.CharSequence body)
Description copied from interface: TagVisitor
Invoked on script tag.

Specified by:
script in interface TagVisitor
Overrides:
script in class TagAdapter

tag

public void tag(Tag tag)
Description copied from interface: TagVisitor
Invoked on tag (open, close or empty).

Warning: the passed tag instance should not be kept beyond this method as the parser reuse it!

Specified by:
tag in interface TagVisitor
Overrides:
tag in class TagAdapter

condComment

public void condComment(java.lang.CharSequence expression,
                        boolean isStartingTag,
                        boolean isHidden,
                        java.lang.CharSequence comment)
Description copied from interface: TagVisitor
Invoked on IE conditional comment. The expression if unmodified expression. comment is optional additional comment and may be null.

Specified by:
condComment in interface TagVisitor
Overrides:
condComment in class TagAdapter

end

public void end()
Description copied from interface: TagVisitor
Invoked at the end, after all content is visited.

Specified by:
end in interface TagVisitor
Overrides:
end in class TagAdapter

postProcess

public char[] postProcess(char[] content)
Post process final content. Required for RESOURCE_ONLY strategy.



Copyright © 2003-2012 Jodd Team