org.peaseplate.chunk
Class AbstractChunk

java.lang.Object
  extended by org.peaseplate.chunk.AbstractChunk
All Implemented Interfaces:
Chunk
Direct Known Subclasses:
AbstractBlock, AbstractOutputChunk, CallChunk, ContentChunk, EndChunk, ImportChunk, IncludeChunk, LineSeparatorChunk, VoidChunk

public abstract class AbstractChunk
extends java.lang.Object
implements Chunk

The abstract implementation of a chunk. It stores the line and column numbers and the next chunk.

Author:
Manfred HANTSCHEL

Constructor Summary
AbstractChunk(TemplateLocator locator, int line, int column)
          Creates the chunk using the specified line and column numbers.
 
Method Summary
 int getColumn()
          Returns the column where this chunk is located in the source of the template.
 int getLine()
          Returns the line where this chunk is located in the source of the template.
 TemplateLocator getLocator()
          Returns the template locator of the template this chunk belongs to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.peaseplate.chunk.Chunk
isEssential, isVisible, render, toString
 

Constructor Detail

AbstractChunk

public AbstractChunk(TemplateLocator locator,
                     int line,
                     int column)
Creates the chunk using the specified line and column numbers.

Parameters:
locator - the locator
line - the line
column - the column
Method Detail

getLocator

public TemplateLocator getLocator()
Description copied from interface: Chunk
Returns the template locator of the template this chunk belongs to

Specified by:
getLocator in interface Chunk
Returns:
the template locator
See Also:
Chunk.getLocator()

getLine

public int getLine()
Description copied from interface: Chunk
Returns the line where this chunk is located in the source of the template.

Specified by:
getLine in interface Chunk
Returns:
the line
See Also:
Chunk.getLine()

getColumn

public int getColumn()
Description copied from interface: Chunk
Returns the column where this chunk is located in the source of the template.

Specified by:
getColumn in interface Chunk
Returns:
the column
See Also:
Chunk.getColumn()


Copyright © 2008. All Rights Reserved.