org.prorefactor.refactor.source
Class Atom

java.lang.Object
  extended by org.prorefactor.refactor.source.Atom
All Implemented Interfaces:
IAtom

public class Atom
extends java.lang.Object
implements IAtom

One or more characters in a source file, which could never be split between two tokens. These are copied directly out of Proparse's "scanner". Atoms and SourceFile objects should be considered "immutable". You should only modify the Tokens which reference the Atoms.


Constructor Summary
Atom(java.lang.String text)
          You would create your own Atom if you were generating new code to be written to a source file.
 
Method Summary
 int column()
           
static IAtom getFirst(IAtom position)
          Given an IAtom, repeat through prev() until the first is found
static java.lang.String getText(IAtom begin, IAtom terminator)
          Find the text between two IAtoms, inclusive of begin, exclusive of the terminator.
 int line()
           
 IAtom next()
           
 IAtom prev()
           
 void setColumn(int column)
           
 void setLine(int line)
           
 void setNext(IAtom next)
           
 void setPrev(IAtom prev)
           
 void setText(java.lang.String text)
           
 void setType(int type)
           
 java.lang.String text()
           
 int type()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Atom

public Atom(java.lang.String text)
You would create your own Atom if you were generating new code to be written to a source file. Usually in those cases, only the text

Method Detail

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

getFirst

public static IAtom getFirst(IAtom position)
Given an IAtom, repeat through prev() until the first is found


getText

public static java.lang.String getText(IAtom begin,
                                       IAtom terminator)
Find the text between two IAtoms, inclusive of begin, exclusive of the terminator.



Copyright © 2008 Joanju Software. All Rights Reserved.