protected class DynamicType.Builder.AbstractBase.DefaultFieldValueTarget extends DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder<S> implements DynamicType.Builder.FieldValueTarget<S>
DynamicType.Builder
for which a field was recently defined such that attributes
can be added to this recently defined field.DynamicType.Builder.FieldValueTarget.NumericRangeValidator
DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.ExceptionDeclarableMethodInterception<S>, DynamicType.Builder.FieldAnnotationTarget<S>, DynamicType.Builder.FieldValueTarget<S>, DynamicType.Builder.MatchedMethodInterception<S>, DynamicType.Builder.MethodAnnotationTarget<S>, DynamicType.Builder.OptionalMatchedMethodInterception<S>
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.FieldAnnotationTarget<S> |
annotateField(Annotation... annotation)
Defines annotations to be added to the currently selected field.
|
DynamicType.Builder.FieldAnnotationTarget<S> |
annotateField(AnnotationDescription... annotation)
Defines annotations to be added to the currently selected field.
|
DynamicType.Builder.FieldAnnotationTarget<S> |
annotateField(Collection<? extends AnnotationDescription> annotations)
Defines annotations to be added to the currently selected field.
|
DynamicType.Builder.FieldAnnotationTarget<S> |
annotateField(Iterable<? extends Annotation> annotations)
Defines annotations to be added to the currently selected field.
|
DynamicType.Builder.FieldAnnotationTarget<S> |
attribute(FieldAttributeAppender.Factory attributeAppenderFactory)
Defines an attribute appender factory to be applied onto the currently selected field.
|
boolean |
equals(Object other) |
int |
hashCode() |
protected DynamicType.Builder<S> |
materialize()
Materializes the current state of the build before applying another modification.
|
String |
toString() |
DynamicType.Builder.FieldAnnotationTarget<S> |
value(boolean value)
Defines a
boolean value to become the optional default value for the recently defined
static field. |
DynamicType.Builder.FieldAnnotationTarget<S> |
value(double value)
Defined a default value for a
double -typed static field. |
DynamicType.Builder.FieldAnnotationTarget<S> |
value(float value)
Defined a default value for a
float -typed static field. |
DynamicType.Builder.FieldAnnotationTarget<S> |
value(int value)
Defines an
int value to be become the optional default value for the recently defined
static field. |
DynamicType.Builder.FieldAnnotationTarget<S> |
value(long value)
Defined a default value for a
long -typed static field. |
DynamicType.Builder.FieldAnnotationTarget<S> |
value(String value)
Defined a default value for a
String -typed static field. |
annotateType, annotateType, annotateType, annotateType, attribute, classFileVersion, classVisitor, constructor, context, define, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, ignoreMethods, implement, implement, implement, implement, invokable, invokable, make, method, methodGraphCompiler, modifiers, modifiers, name, name, name
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
annotateType, annotateType, annotateType, annotateType, attribute, classFileVersion, classVisitor, constructor, context, define, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, ignoreMethods, implement, implement, implement, implement, invokable, invokable, make, method, methodGraphCompiler, modifiers, modifiers, name, name, name
protected DynamicType.Builder<S> materialize()
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder
materialize
in class DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder<S>
public DynamicType.Builder.FieldAnnotationTarget<S> value(boolean value)
DynamicType.Builder.FieldValueTarget
boolean
value to become the optional default value for the recently defined
static
field. Defining such a boolean default value is only legal for fields that are
represented as an integer within the Java virtual machine. These types are the boolean
type,
the byte
type, the short
type, the char
type and the int
type.value
in interface DynamicType.Builder.FieldValueTarget<S>
value
- The value to be defined as a default value for the recently defined field.public DynamicType.Builder.FieldAnnotationTarget<S> value(int value)
DynamicType.Builder.FieldValueTarget
int
value to be become the optional default value for the recently defined
static
field. Defining such an integer default value is only legal for fields that are
represented as an integer within the Java virtual machine. These types are the boolean
type,
the byte
type, the short
type, the char
type and the int
type. By
extension, integer types can also be defined for long
types and are automatically converted.value
in interface DynamicType.Builder.FieldValueTarget<S>
value
- The value to be defined as a default value for the recently defined field.public DynamicType.Builder.FieldAnnotationTarget<S> value(long value)
DynamicType.Builder.FieldValueTarget
long
-typed static
field. This is only legal if the
defined field is also of type long
.value
in interface DynamicType.Builder.FieldValueTarget<S>
value
- The value to be defined as a default value for the recently defined field.public DynamicType.Builder.FieldAnnotationTarget<S> value(float value)
DynamicType.Builder.FieldValueTarget
float
-typed static
field. This is only legal if the
defined field is also of type float
.value
in interface DynamicType.Builder.FieldValueTarget<S>
value
- The value to be defined as a default value for the recently defined field.public DynamicType.Builder.FieldAnnotationTarget<S> value(double value)
DynamicType.Builder.FieldValueTarget
double
-typed static
field. This is only legal if the
defined field is also of type double
.value
in interface DynamicType.Builder.FieldValueTarget<S>
value
- The value to be defined as a default value for the recently defined field.public DynamicType.Builder.FieldAnnotationTarget<S> value(String value)
DynamicType.Builder.FieldValueTarget
String
-typed static
field. This is only legal if
the defined field is also of type String
. The string must not be null
.value
in interface DynamicType.Builder.FieldValueTarget<S>
value
- The value to be defined as a default value for the recently defined field.public DynamicType.Builder.FieldAnnotationTarget<S> attribute(FieldAttributeAppender.Factory attributeAppenderFactory)
DynamicType.Builder.FieldAnnotationTarget
attribute
in interface DynamicType.Builder.FieldAnnotationTarget<S>
attributeAppenderFactory
- The attribute appender factory to apply onto the currently selected
field.public DynamicType.Builder.FieldAnnotationTarget<S> annotateField(Annotation... annotation)
DynamicType.Builder.FieldAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateField
in interface DynamicType.Builder.FieldAnnotationTarget<S>
annotation
- The annotations to add to the currently selected field.public DynamicType.Builder.FieldAnnotationTarget<S> annotateField(Iterable<? extends Annotation> annotations)
DynamicType.Builder.FieldAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateField
in interface DynamicType.Builder.FieldAnnotationTarget<S>
annotations
- The annotations to add to the currently selected field.public DynamicType.Builder.FieldAnnotationTarget<S> annotateField(AnnotationDescription... annotation)
DynamicType.Builder.FieldAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateField
in interface DynamicType.Builder.FieldAnnotationTarget<S>
annotation
- The annotations to add to the currently selected field.public DynamicType.Builder.FieldAnnotationTarget<S> annotateField(Collection<? extends AnnotationDescription> annotations)
DynamicType.Builder.FieldAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateField
in interface DynamicType.Builder.FieldAnnotationTarget<S>
annotations
- The annotations to add to the currently selected field.Copyright © 2014–2015. All rights reserved.