Package net.bytebuddy
Interface NamingStrategy
-
- All Known Implementing Classes:
NamingStrategy.AbstractBase,NamingStrategy.PrefixingRandom,NamingStrategy.SuffixingRandom
public interface NamingStrategyA naming strategy for determining a fully qualified name for a dynamically created Java type.
Note that subclasses that lie within the same package as their superclass can access package-private methods of super types within the same package.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classNamingStrategy.AbstractBaseAn abstract base implementation where the names of redefined and rebased types are retained.static classNamingStrategy.PrefixingRandomA naming strategy that creates a name by prefixing a given class and its package with another package and by appending a random number to the class's simple name.static classNamingStrategy.SuffixingRandomA naming strategy that creates a name by concatenating: The super classes package and name A given suffix string A random number Between all these elements, a$sign is included into the name to improve readability.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringrebase(TypeDescription typeDescription)Determines a name for the dynamic type when rebasing the provided type.java.lang.Stringredefine(TypeDescription typeDescription)Determines a name for the dynamic type when redefining the provided type.java.lang.Stringsubclass(TypeDescription.Generic superClass)Determines a new name when creating a new type that subclasses the provided type.
-
-
-
Method Detail
-
subclass
java.lang.String subclass(TypeDescription.Generic superClass)
Determines a new name when creating a new type that subclasses the provided type.- Parameters:
superClass- The super type of the created type.- Returns:
- The name of the dynamic type.
-
redefine
java.lang.String redefine(TypeDescription typeDescription)
Determines a name for the dynamic type when redefining the provided type.- Parameters:
typeDescription- The type being redefined.- Returns:
- The name of the dynamic type.
-
rebase
java.lang.String rebase(TypeDescription typeDescription)
Determines a name for the dynamic type when rebasing the provided type.- Parameters:
typeDescription- The type being redefined.- Returns:
- The name of the dynamic type.
-
-