-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSite.java
More file actions
22 lines (20 loc) · 884 Bytes
/
Copy pathSite.java
File metadata and controls
22 lines (20 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/***
* Excerpted from "Language Implementation Patterns",
* published by The Pragmatic Bookshelf.
* Copyrights apply to this code. It may not be used to create training material,
* courses, books, articles, and the like. Contact us if you are in doubt.
* We make no guarantees that this code is fit for any purpose.
* Visit http://www.pragmaticprogrammer.com/titles/tpdsl for more book information.
***/
import java.util.*;
public class Site { // can refer to Site in a Fig file
public int port;
protected String answers; // set with setAnswers
public List<String> aliases;
/** The reflection support code looks for setters first then fields */
public void setAnswers(String answers) { this.answers = answers; }
public String toString() {
return "<Site "+answers+":"+port+
(aliases==null?"":(",aliases="+aliases))+">";
}
}