src2xml
Class Detector

java.lang.Object
  extended by src2xml.Detector

public abstract class Detector
extends java.lang.Object

A Detector is an object suitable to identify a particular occurrence in source file. This is an abstract interface to generic occurrence detection in the source stream.


Field Summary
 boolean include
          Include or exclude triggering pattern
 java.lang.String occurrence
          Occurrence string
 
Constructor Summary
Detector(boolean inc)
          Class constructor
 
Method Summary
abstract  boolean IsOccurred(Source src)
          Read an element from source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

occurrence

public java.lang.String occurrence
Occurrence string


include

public boolean include
Include or exclude triggering pattern

Constructor Detail

Detector

public Detector(boolean inc)
Class constructor

Parameters:
inc - A boolean that states if include or not detected occurrence
Method Detail

IsOccurred

public abstract boolean IsOccurred(Source src)
                            throws java.io.IOException
Read an element from source

Parameters:
src - The source stream
Returns:
Return true if an occurrence is detected
Throws:
java.io.IOException - If an input exception occurred