org.apache.jsieve.parser
Class SieveNode

java.lang.Object
  extended by org.apache.jsieve.parser.SieveNode
Direct Known Subclasses:
SimpleNode

public class SieveNode
extends java.lang.Object

Class SieveNode defines aspects all jjTree parse nodes may require. Creation Date: 27-Jan-04


Constructor Summary
SieveNode()
          Constructor for SieveNode.
 
Method Summary
 ScriptCoordinate getCoordinate()
          Gets the position of this node in the script.
 Token getFirstToken()
          Gets the first token comprising this node.
 java.lang.String getLastComment()
          Get the last comment before this node and after the last node.
 Token getLastToken()
          Gets the last token comprising this node.
 java.lang.String getName()
          Returns the name.
 java.util.List<java.lang.String> getPrecedingComments()
          Get any comments between this node and the previous one.
 java.lang.Object getValue()
          Returns the value.
 void setFirstToken(Token firstToken)
          Sets the first token comprising this node.
 void setLastToken(Token lastToken)
          Sets the last token comprising this node.
 void setName(java.lang.String name)
          Sets the name.
 void setValue(java.lang.Object value)
          Sets the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SieveNode

public SieveNode()
Constructor for SieveNode.

Method Detail

getName

public java.lang.String getName()
Returns the name.

Returns:
String

getValue

public java.lang.Object getValue()
Returns the value.

Returns:
Object

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - The name to set

setValue

public void setValue(java.lang.Object value)
Sets the value.

Parameters:
value - The value to set

getFirstToken

public Token getFirstToken()
Gets the first token comprising this node.

Returns:
Token, not null

setFirstToken

public void setFirstToken(Token firstToken)
Sets the first token comprising this node.

Parameters:
firstToken - Token, not null

getLastToken

public Token getLastToken()
Gets the last token comprising this node.

Returns:
Token, not null

setLastToken

public void setLastToken(Token lastToken)
Sets the last token comprising this node.

Parameters:
lastToken - Token, not null

getCoordinate

public ScriptCoordinate getCoordinate()
Gets the position of this node in the script.

Returns:
ScriptCoordinate containing the position of this node, not null

getPrecedingComments

public java.util.List<java.lang.String> getPrecedingComments()
Get any comments between this node and the previous one. Each comment is returned without whitespace trimming. Comments are returned in the order of occurance in the script.

Returns:
collection of strings, not null

getLastComment

public java.lang.String getLastComment()
Get the last comment before this node and after the last node. Each comment is returned without whitespace trimming. Comments are returned in the order of occurance in the script.

Returns:
the comment without whitespace trimming, or null if there is no comment between this and the last node


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.