Package net.bytebuddy
Class NamingStrategy.Suffixing
java.lang.Object
net.bytebuddy.NamingStrategy.AbstractBase
net.bytebuddy.NamingStrategy.Suffixing
- All Implemented Interfaces:
NamingStrategy
- Direct Known Subclasses:
NamingStrategy.SuffixingRandom
- Enclosing interface:
- NamingStrategy
A naming strategy that appends a given suffix to a name, without a randomized element.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A base name resolver is responsible for resolving a name onto which the suffix is appended.Nested classes/interfaces inherited from interface net.bytebuddy.NamingStrategy
NamingStrategy.AbstractBase, NamingStrategy.PrefixingRandom, NamingStrategy.Suffixing, NamingStrategy.SuffixingRandom
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NamingStrategy.Suffixing.BaseNameResolver
A resolver for the base name for naming the unnamed type.private static final String
The package prefix of thejava.*
packages for which the definition of non-bootstrap types is illegal.private final String
The renaming location for types of theJAVA_PACKAGE
.private final String
The suffix to attach to a super type name.Fields inherited from interface net.bytebuddy.NamingStrategy
BYTE_BUDDY_RENAME_PACKAGE, NO_PREFIX
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into Byte Buddy's package namespace.Creates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into Byte Buddy's package namespace.Suffixing
(String suffix, NamingStrategy.Suffixing.BaseNameResolver baseNameResolver) Creates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into Byte Buddy's package namespace.Suffixing
(String suffix, NamingStrategy.Suffixing.BaseNameResolver baseNameResolver, String javaLangPackagePrefix) Creates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into a given namespace. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
name
(TypeDescription superClass) Determines a new name when creating a new type that subclasses the provided type.Methods inherited from class net.bytebuddy.NamingStrategy.AbstractBase
rebase, redefine, subclass
-
Field Details
-
JAVA_PACKAGE
The package prefix of thejava.*
packages for which the definition of non-bootstrap types is illegal.- See Also:
-
suffix
The suffix to attach to a super type name. -
javaLangPackagePrefix
The renaming location for types of theJAVA_PACKAGE
. -
baseNameResolver
A resolver for the base name for naming the unnamed type.
-
-
Constructor Details
-
Suffixing
Creates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into Byte Buddy's package namespace. All names are derived from the unnamed type's super type.- Parameters:
suffix
- The suffix for the generated class.
-
Suffixing
Creates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into Byte Buddy's package namespace.- Parameters:
suffix
- The suffix for the generated class.javaLangPackagePrefix
- The fallback namespace for type's that subclass types within thejava.*
namespace. If The prefix is set to the empty string, no prefix is added.
-
Suffixing
Creates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into Byte Buddy's package namespace.- Parameters:
suffix
- The suffix for the generated class.baseNameResolver
- The base name resolver that is queried for locating the base name.
-
Suffixing
public Suffixing(String suffix, NamingStrategy.Suffixing.BaseNameResolver baseNameResolver, String javaLangPackagePrefix) Creates an immutable naming strategy with a given suffix but moves types that subclass types within thejava.lang
package into a given namespace.- Parameters:
suffix
- The suffix for the generated class.baseNameResolver
- The base name resolver that is queried for locating the base name.javaLangPackagePrefix
- The fallback namespace for type's that subclass types within thejava.*
namespace. If The prefix is set to the empty string, no prefix is added.
-
-
Method Details
-
name
Description copied from class:NamingStrategy.AbstractBase
Determines a new name when creating a new type that subclasses the provided type.- Specified by:
name
in classNamingStrategy.AbstractBase
- Parameters:
superClass
- The super type of the created type.- Returns:
- The name of the dynamic type.
-