01: package org.kohsuke.rngom.binary;
02:
03: import org.kohsuke.rngom.binary.visitor.PatternFunction;
04: import org.kohsuke.rngom.binary.visitor.PatternVisitor;
05:
06: public class ErrorPattern extends Pattern {
07: ErrorPattern() {
08: super (false, EMPTY_CONTENT_TYPE, ERROR_HASH_CODE);
09: }
10:
11: boolean samePattern(Pattern other) {
12: return other instanceof ErrorPattern;
13: }
14:
15: public void accept(PatternVisitor visitor) {
16: visitor.visitError();
17: }
18:
19: public Object apply(PatternFunction f) {
20: return f.caseError(this);
21: }
22: }
|