| java.lang.Object org.xbill.DNS.Generator
Generator | public class Generator (Code) | | A representation of a $GENERATE statement in a master file.
author: Brian Wellington |
Field Summary | |
final public int | dclass The class of the generated records. | public long | end The end of the range. | final public String | namePattern The pattern to use for generating record names. | final public Name | origin The origin to append to relative names. | final public String | rdataPattern The pattern to use for generating record data. | public long | start The start of the range. | public long | step The step value of the range. | final public long | ttl The ttl of the generated records. | final public int | type The type of the generated records. |
Constructor Summary | |
public | Generator(long start, long end, long step, String namePattern, int type, int dclass, long ttl, String rdataPattern, Name origin) Creates a specification for generating records, as a $GENERATE
statement in a master file.
Parameters: start - The start of the range. Parameters: end - The end of the range. Parameters: step - The step value of the range. Parameters: namePattern - The pattern to use for generating record names. Parameters: type - The type of the generated records. |
Method Summary | |
public Record[] | expand() Constructs and returns all records in the expansion. | public Record | nextRecord() Constructs and returns the next record in the expansion. | public static boolean | supportedType(int type) Indicates whether generation is supported for this type. | public String | toString() Converts the generate specification to a string containing the corresponding
$GENERATE statement. |
dclass | final public int dclass(Code) | | The class of the generated records.
|
end | public long end(Code) | | The end of the range.
|
namePattern | final public String namePattern(Code) | | The pattern to use for generating record names.
|
origin | final public Name origin(Code) | | The origin to append to relative names.
|
rdataPattern | final public String rdataPattern(Code) | | The pattern to use for generating record data.
|
start | public long start(Code) | | The start of the range.
|
step | public long step(Code) | | The step value of the range.
|
ttl | final public long ttl(Code) | | The ttl of the generated records.
|
type | final public int type(Code) | | The type of the generated records.
|
Generator | public Generator(long start, long end, long step, String namePattern, int type, int dclass, long ttl, String rdataPattern, Name origin)(Code) | | Creates a specification for generating records, as a $GENERATE
statement in a master file.
Parameters: start - The start of the range. Parameters: end - The end of the range. Parameters: step - The step value of the range. Parameters: namePattern - The pattern to use for generating record names. Parameters: type - The type of the generated records. The supported types arePTR, CNAME, DNAME, A, AAAA, and NS. Parameters: dclass - The class of the generated records. Parameters: ttl - The ttl of the generated records. Parameters: rdataPattern - The pattern to use for generating record data. Parameters: origin - The origin to append to relative names. throws: IllegalArgumentException - The range is invalid. throws: IllegalArgumentException - The type does not support generation. throws: IllegalArgumentException - The dclass is not a valid class. |
expand | public Record[] expand() throws IOException(Code) | | Constructs and returns all records in the expansion.
throws: IOException - The name or rdata of a record was invalid aftersubstitutions were performed. |
nextRecord | public Record nextRecord() throws IOException(Code) | | Constructs and returns the next record in the expansion.
throws: IOException - The name or rdata was invalid after substitutions wereperformed. |
supportedType | public static boolean supportedType(int type)(Code) | | Indicates whether generation is supported for this type.
throws: InvalidTypeException - The type is out of range. |
toString | public String toString()(Code) | | Converts the generate specification to a string containing the corresponding
$GENERATE statement.
|
|
|