org.jplate.foundation.node.impl
Class AbstractNode<BC,LC>

java.lang.Object
  extended by org.jplate.foundation.node.impl.AbstractNode<BC,LC>
Type Parameters:
BC - The data stored in a branch.
LC - The data stored in a leaf.
All Implemented Interfaces:
java.io.Serializable, FormattableIfc, VisitableIfc<NodeVisitorIfc<BC,LC>>, NodeIfc<BC,LC>
Direct Known Subclasses:
DefaultBranchNode, DefaultLeafNode

public abstract class AbstractNode<BC,LC>
extends java.lang.Object
implements NodeIfc<BC,LC>

Defines an abstract

Modifications:
    $Date: 2008-12-02 12:32:45 -0500 (Tue, 02 Dec 2008) $
    $Revision: 479 $
    $Author: sfloess $
    $HeadURL: https://jplate.svn.sourceforge.net/svnroot/jplate/trunk/src/dev/java/org/jplate/foundation/node/impl/AbstractNode.java $
    

See Also:
Serialized Form

Field Summary
private  org.apache.commons.logging.Log _log
          Used for logging.
private  BranchNodeIfc<BC,LC> _parent
          Holds the parent.
private  SourceIfc<?> _source
          Holds the source from which self was generated.
 
Constructor Summary
protected AbstractNode()
          Default constructor.
protected AbstractNode(BranchNodeIfc<BC,LC> parent)
          This constructor sets the parent and data (context).
 
Method Summary
 BranchNodeIfc<BC,LC> getParent()
          Returns the parent node.
 SourceIfc<?> getSource()
          Returns the source from which self was defined.
 void setSource(SourceIfc<?> source)
          Sets the source from which this node was defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jplate.foundation.FormattableIfc
toString
 
Methods inherited from interface org.jplate.foundation.gof.visitor.VisitableIfc
accept
 

Field Detail

_log

private final transient org.apache.commons.logging.Log _log
Used for logging.


_parent

private BranchNodeIfc<BC,LC> _parent
Holds the parent.


_source

private SourceIfc<?> _source
Holds the source from which self was generated.

Constructor Detail

AbstractNode

protected AbstractNode(BranchNodeIfc<BC,LC> parent)
This constructor sets the parent and data (context).

Parameters:
parent - The parent branch.

AbstractNode

protected AbstractNode()
Default constructor.

Method Detail

getParent

public BranchNodeIfc<BC,LC> getParent()
Returns the parent node.

Specified by:
getParent in interface NodeIfc<BC,LC>
Returns:
The parent node.

getSource

public SourceIfc<?> getSource()
Returns the source from which self was defined.

Specified by:
getSource in interface NodeIfc<BC,LC>
Returns:
the source from which self was defined.

setSource

public void setSource(SourceIfc<?> source)
Sets the source from which this node was defined.

Specified by:
setSource in interface NodeIfc<BC,LC>
Parameters:
source - The source from which self was defined.