01: package org.kohsuke.rngom.parse.host;
02:
03: import org.kohsuke.rngom.ast.builder.BuildException;
04: import org.kohsuke.rngom.ast.builder.CommentList;
05: import org.kohsuke.rngom.ast.om.Location;
06:
07: /**
08: *
09: * @author
10: * Kohsuke Kawaguchi (kk@kohsuke.org)
11: */
12: class CommentListHost extends Base implements CommentList {
13:
14: final CommentList lhs;
15: final CommentList rhs;
16:
17: CommentListHost(CommentList lhs, CommentList rhs) {
18: this .lhs = lhs;
19: this .rhs = rhs;
20: }
21:
22: public void addComment(String value, Location _loc)
23: throws BuildException {
24: LocationHost loc = cast(_loc);
25: if (lhs != null)
26: lhs.addComment(value, loc.lhs);
27: if (rhs != null)
28: rhs.addComment(value, loc.rhs);
29: }
30: }
|