dk.brics.relaxng
Class Pattern

java.lang.Object
  extended by dk.brics.relaxng.Pattern
Direct Known Subclasses:
MultiContentPattern, NoContentPattern, SingleContentPattern

public abstract class Pattern
extends Object

Abstract superclass for patterns.


Field Summary
protected  Origin origin
          Origin of this pattern.
 
Constructor Summary
Pattern(Origin origin)
          Constructs a new pattern.
 
Method Summary
 Origin getOrigin()
          Returns the source information.
abstract
<T> T
process(PatternProcessor<T> v)
          Applies the given pattern processor on this pattern.
 void setOrigin(Origin origin)
          Sets the source information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

origin

protected Origin origin
Origin of this pattern.

Constructor Detail

Pattern

public Pattern(Origin origin)
Constructs a new pattern.

Parameters:
origin - source information (null if not applicable)
Method Detail

getOrigin

public Origin getOrigin()
Returns the source information.

Returns:
source information (null if none available)

process

public abstract <T> T process(PatternProcessor<T> v)
Applies the given pattern processor on this pattern.

Type Parameters:
T - return type
Parameters:
v - pattern processor
Returns:
result from processor

setOrigin

public void setOrigin(Origin origin)
Sets the source information.

Parameters:
origin - source information (null if not applicable)


Copyright © 2005-2010 Anders Møller.