net.sourceforge.scopes.rewriters
Class ModifierNodeVisitor
java.lang.Object
org.htmlparser.visitors.NodeVisitor
net.sourceforge.scopes.rewriters.ModifierNodeVisitor
- Direct Known Subclasses:
- IdentityVisitor, WindowNameNodeVisitor
public abstract class ModifierNodeVisitor
- extends org.htmlparser.visitors.NodeVisitor
It represents an HTML node visitor that can manipulate nodes.
Method Summary |
protected java.lang.String |
addJavaScriptCallToEvent(java.lang.String oldCall,
java.lang.String callToAdd)
Utility code to add JavaScript code to an event that can already have
some code in it; |
void |
configure(java.util.Map<java.lang.String,java.lang.Object> parameters)
Configures the visitor. |
void |
setLastVisitor(NodeVisitorWithResult lastVisitor)
Sets the last visitor, i.e. the visitor that can write additional code. |
Methods inherited from class org.htmlparser.visitors.NodeVisitor |
beginParsing, finishedParsing, shouldRecurseChildren, shouldRecurseSelf, visitEndTag, visitRemarkNode, visitStringNode, visitTag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lastVisitor
protected NodeVisitorWithResult lastVisitor
- It is the last visitor, i.e. the visitor that can write additional code.
ModifierNodeVisitor
public ModifierNodeVisitor()
configure
public void configure(java.util.Map<java.lang.String,java.lang.Object> parameters)
- Configures the visitor.
- Parameters:
parameters
- Parameters map.
setLastVisitor
public void setLastVisitor(NodeVisitorWithResult lastVisitor)
- Sets the last visitor, i.e. the visitor that can write additional code.
- Parameters:
lastVisitor
- The last visitor.
addJavaScriptCallToEvent
protected java.lang.String addJavaScriptCallToEvent(java.lang.String oldCall,
java.lang.String callToAdd)
- Utility code to add JavaScript code to an event that can already have
some code in it;
- Parameters:
oldCall
- The old call. It can be null or empty.callToAdd
- The JavaScript code to add.
- Returns:
- The union of old and new code.