U - A loaded type that the built type is guaranteed to be a subclass of.public abstract static class DynamicType.Builder.FieldDefinition.Optional.Valuable.AbstractBase<U> extends DynamicType.Builder.FieldDefinition.Optional.AbstractBase<U> implements DynamicType.Builder.FieldDefinition.Optional.Valuable<U>
DynamicType.Builder.AbstractBase.Delegator<U>, DynamicType.Builder.AbstractBase.UsingTypeWriter<U>DynamicType.Builder.FieldDefinition.Optional.Valuable.AbstractBase<U>DynamicType.Builder.FieldDefinition.Optional.Valuable<V>DynamicType.Builder.FieldDefinition.Optional<U>DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.InnerTypeDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.RecordComponentDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S>| Constructor and Description |
|---|
AbstractBase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract DynamicType.Builder.FieldDefinition.Optional<U> |
defaultValue(Object defaultValue)
Defines the supplied value as a default value of the previously defined or matched field.
|
DynamicType.Builder.FieldDefinition.Optional<U> |
value(boolean value)
Defines the supplied
boolean value as a default value of the previously defined or matched field. |
DynamicType.Builder.FieldDefinition.Optional<U> |
value(double value)
Defines the supplied
double value as a default value of the previously defined or matched field. |
DynamicType.Builder.FieldDefinition.Optional<U> |
value(float value)
Defines the supplied
float value as a default value of the previously defined or matched field. |
DynamicType.Builder.FieldDefinition.Optional<U> |
value(int value)
Defines the supplied
int value as a default value of the previously defined or matched field. |
DynamicType.Builder.FieldDefinition.Optional<U> |
value(long value)
Defines the supplied
long value as a default value of the previously defined or matched field. |
DynamicType.Builder.FieldDefinition.Optional<U> |
value(String value)
Defines the supplied
String value as a default value of the previously defined or matched field. |
annotateField, annotateField, annotateFieldannotateType, attribute, declaredTypes, define, defineConstructor, defineField, defineMethod, defineRecordComponent, field, ignoreAlso, ignoreAlso, implement, initializer, initializer, innerTypeOf, innerTypeOf, invokable, make, make, make, make, materialize, merge, modifiers, name, nestHost, nestMembers, permittedSubclass, recordComponent, recordComponent, require, suffix, topLevelType, toTypeDescription, transform, typeVariable, unsealed, visit, wrap, wrapannotateType, annotateType, annotateType, constructor, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, defineRecordComponent, field, implement, implement, implement, innerTypeOf, innerTypeOf, innerTypeOf, invokable, merge, method, modifiers, modifiers, nestHost, nestMembers, nestMembers, nestMembers, noNestMate, permittedSubclass, permittedSubclass, permittedSubclass, require, require, require, serialVersionUid, typeVariable, typeVariable, typeVariable, typeVariable, withHashCodeEquals, withToString, wrap, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitannotateField, annotateField, annotateField, annotateField, attribute, transformannotateType, annotateType, annotateType, annotateType, attribute, constructor, declaredTypes, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, define, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, defineRecordComponent, defineRecordComponent, field, field, ignoreAlso, ignoreAlso, implement, implement, implement, implement, initializer, initializer, innerTypeOf, innerTypeOf, innerTypeOf, innerTypeOf, innerTypeOf, invokable, invokable, make, make, make, make, merge, merge, method, modifiers, modifiers, modifiers, name, nestHost, nestHost, nestMembers, nestMembers, nestMembers, nestMembers, noNestMate, permittedSubclass, permittedSubclass, permittedSubclass, permittedSubclass, recordComponent, recordComponent, require, require, require, require, serialVersionUid, suffix, topLevelType, toTypeDescription, transform, typeVariable, typeVariable, typeVariable, typeVariable, typeVariable, unsealed, visit, withHashCodeEquals, withToString, wrap, wrap, wrap, wrappublic DynamicType.Builder.FieldDefinition.Optional<U> value(boolean value)
Defines the supplied boolean value as a default value of the previously defined or matched field. The value can only
be set for numeric fields of type boolean, byte, short, char or int. For non-boolean
fields, the field's value is set to 0 for false or 1 for true.
Important: A default value in a Java class file defines a field's value prior to the class's initialization. This value
is only visible to code if the field is declared static. A default value can also be set for non-static fields where
the value is not visible to code. The Java compiler only defines such values for final fields.
value in interface DynamicType.Builder.FieldDefinition.Valuable<U>value - The value to define as a default value of the defined field.public DynamicType.Builder.FieldDefinition.Optional<U> value(int value)
Defines the supplied int value as a default value of the previously defined or matched field. The value can only
be set for numeric fields of type boolean, byte, short, char or int where the
value must be within the numeric type's range. The boolean type is regarded as a numeric type with the possible
values of 0 and 1 representing false and true.
Important: A default value in a Java class file defines a field's value prior to the class's initialization. This value
is only visible to code if the field is declared static. A default value can also be set for non-static fields where
the value is not visible to code. The Java compiler only defines such values for final fields.
value in interface DynamicType.Builder.FieldDefinition.Valuable<U>value - The value to define as a default value of the defined field.public DynamicType.Builder.FieldDefinition.Optional<U> value(long value)
Defines the supplied long value as a default value of the previously defined or matched field.
Important: A default value in a Java class file defines a field's value prior to the class's initialization. This value
is only visible to code if the field is declared static. A default value can also be set for non-static fields where
the value is not visible to code. The Java compiler only defines such values for final fields.
value in interface DynamicType.Builder.FieldDefinition.Valuable<U>value - The value to define as a default value of the defined field.public DynamicType.Builder.FieldDefinition.Optional<U> value(float value)
Defines the supplied float value as a default value of the previously defined or matched field.
Important: A default value in a Java class file defines a field's value prior to the class's initialization. This value
is only visible to code if the field is declared static. A default value can also be set for non-static fields where
the value is not visible to code. The Java compiler only defines such values for final fields.
value in interface DynamicType.Builder.FieldDefinition.Valuable<U>value - The value to define as a default value of the defined field.public DynamicType.Builder.FieldDefinition.Optional<U> value(double value)
Defines the supplied double value as a default value of the previously defined or matched field.
Important: A default value in a Java class file defines a field's value prior to the class's initialization. This value
is only visible to code if the field is declared static. A default value can also be set for non-static fields where
the value is not visible to code. The Java compiler only defines such values for final fields.
value in interface DynamicType.Builder.FieldDefinition.Valuable<U>value - The value to define as a default value of the defined field.public DynamicType.Builder.FieldDefinition.Optional<U> value(String value)
Defines the supplied String value as a default value of the previously defined or matched field.
Important: A default value in a Java class file defines a field's value prior to the class's initialization. This value
is only visible to code if the field is declared static. A default value can also be set for non-static fields where
the value is not visible to code. The Java compiler only defines such values for final fields.
value in interface DynamicType.Builder.FieldDefinition.Valuable<U>value - The value to define as a default value of the defined field.protected abstract DynamicType.Builder.FieldDefinition.Optional<U> defaultValue(Object defaultValue)
defaultValue - The value to define as a default value of the defined field.Copyright © 2014–2023. All rights reserved.