public static class NamingStrategy.PrefixingRandom extends Object implements NamingStrategy
NamingStrategy.Fixed, NamingStrategy.PrefixingRandom, NamingStrategy.SuffixingRandom, NamingStrategy.Unbound, NamingStrategy.UnnamedType
Constructor and Description |
---|
PrefixingRandom(String prefix)
Creates a new prefixing random naming strategy.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
String |
name(NamingStrategy.UnnamedType unnamedType)
Generates a fully qualified name for a Java type.
|
String |
toString() |
public PrefixingRandom(String prefix)
prefix
- The prefix to append.public String name(NamingStrategy.UnnamedType unnamedType)
NamingStrategy
java.lang
package since such types cannot be loaded using a normal class loader. Also, the name should not yet be taken
by another type since this would cause conflicts in the name space. Therefore, it is recommendable to include
a random sequence within the name.name
in interface NamingStrategy
unnamedType
- An unnamed type that is to be named.Copyright © 2014–2015. All rights reserved.