If type validation is enabled, Byte Buddy performs several checks to ensure that a generated
class file is specified in a valid manner. This involves checks of the generated instrumented
type and checks of the generated byte code. Byte Buddy's org.
instances perform their own checks, independently of any type validation.
The JVM's verifier performs its own checks; an illegal class file is never loaded. However, Byte Buddy's checks might be more expressive in the context of using the library. Also, Byte Buddy emits exceptions at class creation time while the JVM emits errors at class loading time.
| Modifier and Type | Field and Description |
|---|---|
| public static final TypeValidation | DISABLED
Disables Byte Buddy's validation. |
| public static final TypeValidation | ENABLED
Enables Byte Buddy's validation. |
| private final boolean | enabled
|
| Access | Constructor and Description |
|---|---|
| private | TypeValidation(boolean
true if type validation is enabled.Creates a new type validation enumeration. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public static TypeValidation | Returns: A suitable type validation representation.true if type validation should be enabled.Returns |
| public static TypeValidation | |
| public static TypeValidation[] |
| DISABLED | back to summary |
|---|---|
| public static final TypeValidation DISABLED Disables Byte Buddy's validation. | |
| ENABLED | back to summary |
|---|---|
| public static final TypeValidation ENABLED Enables Byte Buddy's validation. | |
| enabled | back to summary |
|---|---|
| private final boolean enabled
| |
| TypeValidation | back to summary |
|---|---|
| private TypeValidation(boolean enabled) Creates a new type validation enumeration.
| |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled() Returns
| |
| of | back to summary |
|---|---|
| public static TypeValidation of(boolean enabled) Returns
| |
| valueOf | back to summary |
|---|---|
| public static TypeValidation valueOf(String name) | |
| values | back to summary |
|---|---|
| public static TypeValidation[] values() | |