01: package org.kohsuke.rngom.digested;
02:
03: /**
04: * @author Kohsuke Kawaguchi (kk@kohsuke.org)
05: */
06: public class DRefPattern extends DPattern {
07: private final DDefine target;
08:
09: public DRefPattern(DDefine target) {
10: this .target = target;
11: }
12:
13: public boolean isNullable() {
14: return target.isNullable();
15: }
16:
17: /**
18: * Gets the {@link DDefine} that this block refers to.
19: */
20: public DDefine getTarget() {
21: return target;
22: }
23:
24: /**
25: * Gets the name of the target.
26: */
27: public String getName() {
28: return target.getName();
29: }
30:
31: public Object accept(DPatternVisitor visitor) {
32: return visitor.onRef(this);
33: }
34: }
|