org.apache.jsieve
Class ScriptCoordinate

java.lang.Object
  extended by org.apache.jsieve.ScriptCoordinate

public final class ScriptCoordinate
extends java.lang.Object

Specifies the positional extent of an element within the script being executed. In other words, this gives the line and column at which the elment starts and at which it ends.


Constructor Summary
ScriptCoordinate(int startLineNumber, int startColumnNumber, int endLineNumber, int endColumnNumber)
           
 
Method Summary
 java.lang.String addStartLineAndColumn(java.lang.CharSequence message)
          Appends a standard position phrase to the given message.
 CommandException commandException(java.lang.CharSequence message)
          Creates a command exception based on the given message containing details of the script position.
 void debugDiagnostics(org.apache.commons.logging.Log logger)
          Logs diagnotic information about the script coordinate.
 int getEndColumnNumber()
          Gets the number of the column where the elements ends.
 int getEndLineNumber()
          Gets the number of the line where the element ends.
 org.apache.commons.logging.Log getLog()
           
 int getStartColumnNumber()
          Gets the number of the column where the element start.
 int getStartLineNumber()
          Gets the number of the line where the element starts.
 void logDiagnosticsInfo(org.apache.commons.logging.Log logger)
          Logs diagnotic information about the script coordinate.
 void setLog(org.apache.commons.logging.Log logger)
           
 SyntaxException syntaxException(java.lang.CharSequence message)
          Creates a syntax exception based on the given message containing details of the script position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptCoordinate

public ScriptCoordinate(int startLineNumber,
                        int startColumnNumber,
                        int endLineNumber,
                        int endColumnNumber)
Method Detail

getLog

public org.apache.commons.logging.Log getLog()

setLog

public void setLog(org.apache.commons.logging.Log logger)

getEndColumnNumber

public int getEndColumnNumber()
Gets the number of the column where the elements ends.

Returns:
column number

getEndLineNumber

public int getEndLineNumber()
Gets the number of the line where the element ends.

Returns:
line number

getStartColumnNumber

public int getStartColumnNumber()
Gets the number of the column where the element start.

Returns:
column number

getStartLineNumber

public int getStartLineNumber()
Gets the number of the line where the element starts.

Returns:
line number

syntaxException

public SyntaxException syntaxException(java.lang.CharSequence message)
Creates a syntax exception based on the given message containing details of the script position. The message should end with a full stop.

Parameters:
message - CharSequence containing the base message, not null
Returns:
SyntaxException with details of the script position appended to the message, not null

commandException

public CommandException commandException(java.lang.CharSequence message)
Creates a command exception based on the given message containing details of the script position. The message should end with a full stop.

Parameters:
message - CharSequence containing the base message, not null
Returns:
CommandException with details of the script position appended to the message, not null

addStartLineAndColumn

public java.lang.String addStartLineAndColumn(java.lang.CharSequence message)
Appends a standard position phrase to the given message. This message should end with a full stop.

Parameters:
message - CharSequence message, not null
Returns:
String containing the original message with positional phrase appended, not null

logDiagnosticsInfo

public void logDiagnosticsInfo(org.apache.commons.logging.Log logger)
Logs diagnotic information about the script coordinate.

Parameters:
logger - Log, not null

debugDiagnostics

public void debugDiagnostics(org.apache.commons.logging.Log logger)
Logs diagnotic information about the script coordinate.

Parameters:
logger - Log, not null


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