MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / Generator

Method Generator

src/main/java/core/org/xbill/DNS/Generator.java:73–94  ·  view source on GitHub ↗

Creates a specification for generating records, as a $GENERATE statement in a master file. @param start The start of the range. @param end The end of the range. @param step The step value of the range. @param namePattern The pattern to use for generating record names. @param type The type of the gen

(long start, long end, long step, String namePattern,
	  int type, int dclass, long ttl, String rdataPattern, Name origin)

Source from the content-addressed store, hash-verified

71 * @throws IllegalArgumentException The dclass is not a valid class.
72 */
73public
74Generator(long start, long end, long step, String namePattern,
75 int type, int dclass, long ttl, String rdataPattern, Name origin)
76{
77 if (start < 0 || end < 0 || start > end || step <= 0)
78 throw new IllegalArgumentException
79 ("invalid range specification");
80 if (!supportedType(type))
81 throw new IllegalArgumentException("unsupported type");
82 DClass.check(dclass);
83
84 this.start = start;
85 this.end = end;
86 this.step = step;
87 this.namePattern = namePattern;
88 this.type = type;
89 this.dclass = dclass;
90 this.ttl = ttl;
91 this.rdataPattern = rdataPattern;
92 this.origin = origin;
93 this.current = start;
94}
95
96private String
97substitute(String spec, long n) throws IOException {

Callers

nothing calls this directly

Calls 2

supportedTypeMethod · 0.95
checkMethod · 0.95

Tested by

no test coverage detected