Package net.bytebuddy.description.type
Enum TypeDescription.Generic.OfParameterizedType.RenderingDelegate
- java.lang.Object
-
- java.lang.Enum<TypeDescription.Generic.OfParameterizedType.RenderingDelegate>
-
- net.bytebuddy.description.type.TypeDescription.Generic.OfParameterizedType.RenderingDelegate
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TypeDescription.Generic.OfParameterizedType.RenderingDelegate>
- Enclosing class:
- TypeDescription.Generic.OfParameterizedType
protected static enum TypeDescription.Generic.OfParameterizedType.RenderingDelegate extends java.lang.Enum<TypeDescription.Generic.OfParameterizedType.RenderingDelegate>
A rendering delegate for resolving a parameterized type'sObject.toString()
representation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FOR_JAVA_8_CAPABLE_VM
A rendering delegate for any VM supporting Java 8 or newer where a type's simple name is appended.FOR_LEGACY_VM
A rendering delegate for any VM prior to Java 9 where types are concatenated using a.
character and where the fully qualified names are appended to non-parameterized types.
-
Field Summary
Fields Modifier and Type Field Description protected static TypeDescription.Generic.OfParameterizedType.RenderingDelegate
CURRENT
A rendering delegate for the current VM.
-
Constructor Summary
Constructors Modifier Constructor Description private
RenderingDelegate()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
apply(java.lang.StringBuilder stringBuilder, TypeDescription erasure, TypeDescription.Generic ownerType)
Applies this rendering delegate.static TypeDescription.Generic.OfParameterizedType.RenderingDelegate
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TypeDescription.Generic.OfParameterizedType.RenderingDelegate[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FOR_LEGACY_VM
public static final TypeDescription.Generic.OfParameterizedType.RenderingDelegate FOR_LEGACY_VM
A rendering delegate for any VM prior to Java 9 where types are concatenated using a.
character and where the fully qualified names are appended to non-parameterized types.
-
FOR_JAVA_8_CAPABLE_VM
public static final TypeDescription.Generic.OfParameterizedType.RenderingDelegate FOR_JAVA_8_CAPABLE_VM
A rendering delegate for any VM supporting Java 8 or newer where a type's simple name is appended.
-
-
Field Detail
-
CURRENT
protected static final TypeDescription.Generic.OfParameterizedType.RenderingDelegate CURRENT
A rendering delegate for the current VM.
-
-
Method Detail
-
values
public static TypeDescription.Generic.OfParameterizedType.RenderingDelegate[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TypeDescription.Generic.OfParameterizedType.RenderingDelegate c : TypeDescription.Generic.OfParameterizedType.RenderingDelegate.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeDescription.Generic.OfParameterizedType.RenderingDelegate valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
apply
protected abstract void apply(java.lang.StringBuilder stringBuilder, TypeDescription erasure, TypeDescription.Generic ownerType)
Applies this rendering delegate.- Parameters:
stringBuilder
- The string builder which is used for creating a parameterized type's string representation.erasure
- The rendered type's erasure.ownerType
- The rendered type's owner type.
-
-