org.prorefactor.refactor.source
Class AtomRef
java.lang.Object
org.prorefactor.refactor.source.AtomRef
- All Implemented Interfaces:
- IAtom
public class AtomRef
- extends java.lang.Object
- implements IAtom
A reference to an Atom. When doing macro expansion, we often
need a chain of atoms which is a bunch of fragmented sections
from original source file(s). Rather than copy the atoms for macro
expansion, we create references to the original atoms.
To this end, we only need an object with a reference to the original
atom, and this object's own next/prev attributes. All other attributes
can come from the original Atom. Next and Prev must be other AtomRef
objects - they cannot be Atom objects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AtomRef
public AtomRef(IAtom atom)
AtomRef
public AtomRef(IAtom refTo,
IAtom prevInChain)
- An AtomRef is usually created as part of a chain.
Input the previous IAtom to link the newly created one onto.
column
public int column()
- Specified by:
column
in interface IAtom
line
public int line()
- Specified by:
line
in interface IAtom
next
public IAtom next()
- Specified by:
next
in interface IAtom
prev
public IAtom prev()
- Specified by:
prev
in interface IAtom
text
public java.lang.String text()
- Specified by:
text
in interface IAtom
type
public int type()
- Specified by:
type
in interface IAtom
setColumn
public void setColumn(int column)
- Specified by:
setColumn
in interface IAtom
setLine
public void setLine(int line)
- Specified by:
setLine
in interface IAtom
setNext
public void setNext(IAtom next)
- Specified by:
setNext
in interface IAtom
setPrev
public void setPrev(IAtom prev)
- Specified by:
setPrev
in interface IAtom
setType
public void setType(int type)
- Specified by:
setType
in interface IAtom
setText
public void setText(java.lang.String text)
- Specified by:
setText
in interface IAtom
Copyright © 2008 Joanju Software. All Rights Reserved.