public static class NamingStrategy.Fixed extends Object implements NamingStrategy
This strategy should only be used for one shot type generators since they will otherwise create types that impose naming conflicts.
NamingStrategy.Fixed, NamingStrategy.SuffixingRandom, NamingStrategy.UnnamedType
Constructor and Description |
---|
Fixed(String name)
Creates an immutable fixed naming strategy.
|
Modifier and Type | Method and Description |
---|---|
String |
getName(NamingStrategy.UnnamedType UnnamedType)
Generates a fully qualified internalName for a Java type.
|
public Fixed(String name)
name
- The internalName for the created type.public String getName(NamingStrategy.UnnamedType UnnamedType)
NamingStrategy
java.lang
package since such types cannot be loaded using a normal class loader. Also, the internalName should not yet be taken
by another type since this would cause conflicts in the internalName space. Therefore, it is recommendable to include
a random sequence within the internalName.getName
in interface NamingStrategy
UnnamedType
- An unnamed type that is to be named.Copyright © 2014. All rights reserved.