Package dev.orne.test.rnd.generators
Class URLGenerator
- All Implemented Interfaces:
Generator,TypedGenerator<URL>
@API(status=STABLE,
since="0.1")
@Priority(-1000)
public class URLGenerator
extends AbstractTypedGenerator<URL>
Generator of
URL values.- Since:
- 0.1
- Version:
- 1.0, 2022-11
- Author:
- (w) Iker Hernaez
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classImplementation ofURLStreamHandlerthat prevents opening generated random URLs. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default host.static final StringThe default path.static final StringThe default protocol.Fields inherited from class dev.orne.test.rnd.AbstractGenerator
DEFAULT_NULL_PROBABILITY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class dev.orne.test.rnd.AbstractTypedGenerator
defaultValue, equals, getValueType, hashCode, nullableDefaultValue, nullableRandomValue, randomValue, supportsMethods inherited from class dev.orne.test.rnd.AbstractGenerator
assertSupported, getNullProbability, nullableDefaultValue, nullableRandomValue, randomNull, setNullProbability, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.orne.test.rnd.Generator
asParameterizable, getPriority, nullableDefaultValue, nullableRandomValue
-
Field Details
-
DEFAULT_PROTOCOL
The default protocol.- See Also:
-
DEFAULT_HOST
The default host.- See Also:
-
DEFAULT_PATH
The default path.- See Also:
-
-
Constructor Details
-
URLGenerator
public URLGenerator()Creates a new instance.
-
-
Method Details
-
defaultValue
Returns the default value of the supported type.- Returns:
- The default value.
-
randomValue
Returns a random value of the supported type.- Returns:
- A random value.
-
randomURL
Returns a random URL.- Returns:
- The URL
-