prettify.parser
Class Job

java.lang.Object
  extended by prettify.parser.Job

public class Job
extends java.lang.Object

This is the job object that similar to those in JavaScript Prettify.

Author:
Chan Wai Shing

Field Summary
protected  int basePos
          The starting point of the source code.
protected  java.util.List<java.lang.Object> decorations
          The parsed results.
protected  java.lang.String sourceCode
          The source code.
 
Constructor Summary
Job()
          Constructor.
Job(int basePos, java.lang.String sourceCode)
          Constructor.
 
Method Summary
 int getBasePos()
          Set the starting point of the source code.
 java.util.List<java.lang.Object> getDecorations()
          Get the parsed results.
 java.lang.String getSourceCode()
          Get the source code.
 void setBasePos(int basePos)
          Set the starting point of the source code.
 void setDecorations(java.util.List<java.lang.Object> decorations)
          Set the parsed results.
 void setSourceCode(java.lang.String sourceCode)
          Set the source code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

basePos

protected int basePos
The starting point of the source code.


sourceCode

protected java.lang.String sourceCode
The source code.


decorations

protected java.util.List<java.lang.Object> decorations
The parsed results. nth items are starting position position, n+1th items are the three-letter style keyword, where n start from 0.

Constructor Detail

Job

public Job()
Constructor.


Job

public Job(int basePos,
           java.lang.String sourceCode)
Constructor.

Parameters:
basePos - the starting point of the source code
sourceCode - the source code
Method Detail

getBasePos

public int getBasePos()
Set the starting point of the source code.

Returns:
the position

setBasePos

public void setBasePos(int basePos)
Set the starting point of the source code.

Parameters:
basePos - the position

getSourceCode

public java.lang.String getSourceCode()
Get the source code.

Returns:
the source code

setSourceCode

public void setSourceCode(java.lang.String sourceCode)
Set the source code.

Parameters:
sourceCode - the source code

getDecorations

public java.util.List<java.lang.Object> getDecorations()
Get the parsed results. see decorations.

Returns:
the parsed results

setDecorations

public void setDecorations(java.util.List<java.lang.Object> decorations)
Set the parsed results. see decorations.

Parameters:
decorations - the parsed results