Class AuxiliaryType.NamingStrategy.SuffixingRandom
- java.lang.Object
-
- net.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.SuffixingRandom
-
- All Implemented Interfaces:
AuxiliaryType.NamingStrategy
- Enclosing interface:
- AuxiliaryType.NamingStrategy
@Enhance public static class AuxiliaryType.NamingStrategy.SuffixingRandom extends java.lang.Object implements AuxiliaryType.NamingStrategy
A naming strategy for an auxiliary type which returns the instrumented type's name with a fixed extension and a random number as a suffix. All generated names will be in the same package as the instrumented type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy
AuxiliaryType.NamingStrategy.Enumerating, AuxiliaryType.NamingStrategy.Suffixing, AuxiliaryType.NamingStrategy.SuffixingRandom
-
-
Field Summary
Fields Modifier and Type Field Description private RandomStringrandomStringAn instance for creating random values.private java.lang.StringsuffixThe suffix to append to the instrumented type for creating names for the auxiliary types.
-
Constructor Summary
Constructors Constructor Description SuffixingRandom(java.lang.String suffix)Creates a new suffixing random naming strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringname(TypeDescription instrumentedType, AuxiliaryType auxiliaryType)Names an auxiliary type.
-
-
-
Field Detail
-
suffix
private final java.lang.String suffix
The suffix to append to the instrumented type for creating names for the auxiliary types.
-
randomString
@ValueHandling(IGNORE) private final RandomString randomString
An instance for creating random values.
-
-
Method Detail
-
name
public java.lang.String name(TypeDescription instrumentedType, AuxiliaryType auxiliaryType)
Names an auxiliary type.- Specified by:
namein interfaceAuxiliaryType.NamingStrategy- Parameters:
instrumentedType- The instrumented type for which an auxiliary type is registered.auxiliaryType- The named auxiliary type.- Returns:
- The fully qualified name for the given auxiliary type.
-
-