Top Description Inners Fields Methods
net.bytebuddy

public Interface NamingStrategy

Known Direct Implementers
net.bytebuddy.NamingStrategy.AbstractBase
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.utility.RandomString

A 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 and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
NamingStrategy.AbstractBase

An abstract base implementation where the names of redefined and rebased types are retained.

public static class
NamingStrategy.PrefixingRandom

A 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.

public static class
NamingStrategy.Suffixing

A naming strategy that appends a given suffix to a name, without a randomized element.

public static class
NamingStrategy.SuffixingRandom

A naming strategy that creates a name by concatenating:

  1. The super classes package and name
  2. A given suffix string
  3. A random number

Field Summary

Modifier and TypeField and Description
public static final String
BYTE_BUDDY_RENAME_PACKAGE

The default package for defining types that are renamed to not be contained in the java package.

public static final String
NO_PREFIX

Indicates that types of the java.* package should not be prefixed.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The name of the dynamic type.
rebase
(TypeDescription
The type being redefined.
typeDescription
)

Determines a name for the dynamic type when rebasing the provided type.

public String

Returns:

The name of the dynamic type.
redefine
(TypeDescription
The type being redefined.
typeDescription
)

Determines a name for the dynamic type when redefining the provided type.

public String

Returns:

The name of the dynamic type.
subclass
(TypeDescription.Generic
The super type of the created type.
superClass
)

Determines a new name when creating a new type that subclasses the provided type.