@HashCodeAndEqualsPlugin.Enhance(includeSyntheticFields=true) protected class DynamicType.Builder.AbstractBase.Adapter.OptionalMethodMatchAdapter extends DynamicType.Builder.AbstractBase.Delegator<U> implements DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<U>
DynamicType.Builder.AbstractBase.Adapter<U>, DynamicType.Builder.AbstractBase.Delegator<U>
DynamicType.Builder.MethodDefinition.ImplementationDefinition.AbstractBase<V>, DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<V>
DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.InnerTypeDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S>
Modifier and Type | Field and Description |
---|---|
private TypeList.Generic |
interfaces
The interfaces whose methods are optionally matched.
|
Modifier | Constructor and Description |
---|---|
protected |
OptionalMethodMatchAdapter(TypeList.Generic interfaces)
Creates a new optional method match adapter.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> |
defaultValue(AnnotationValue<?,?> annotationValue)
Defines the previously defined or matched method to return the supplied value as an annotation default value.
|
<V> DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> |
defaultValue(V value,
java.lang.Class<? extends V> type)
Defines the previously defined or matched method to return the supplied value as an annotation default value.
|
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> |
intercept(Implementation implementation)
Implements the previously defined or matched method by the supplied implementation.
|
private DynamicType.Builder.MethodDefinition.ImplementationDefinition<U> |
interfaceType()
Returns a matcher for the interfaces' methods.
|
protected DynamicType.Builder<U> |
materialize()
Creates a new builder that realizes the current state of the builder.
|
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> |
withoutCode()
Defines the previously defined or matched method not to declare a method body.
|
annotateType, attribute, declaredTypes, defineConstructor, defineField, defineMethod, field, ignoreAlso, ignoreAlso, implement, initializer, initializer, innerTypeOf, innerTypeOf, invokable, make, make, make, make, merge, modifiers, name, nestHost, nestMembers, require, suffix, topLevelType, transform, typeVariable, visit
annotateType, 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, field, implement, implement, implement, innerTypeOf, innerTypeOf, innerTypeOf, invokable, merge, method, modifiers, modifiers, nestHost, nestMembers, nestMembers, nestMembers, noNestMate, require, require, require, serialVersionUid, typeVariable, typeVariable, typeVariable, typeVariable, withHashCodeEquals, withToString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
annotateType, annotateType, annotateType, annotateType, attribute, constructor, declaredTypes, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, 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, require, require, require, require, serialVersionUid, suffix, topLevelType, transform, typeVariable, typeVariable, typeVariable, typeVariable, typeVariable, visit, withHashCodeEquals, withToString
private final TypeList.Generic interfaces
protected OptionalMethodMatchAdapter(TypeList.Generic interfaces)
interfaces
- The interfaces whose methods are optionally matched.protected DynamicType.Builder<U> materialize()
DynamicType.Builder.AbstractBase.Delegator
materialize
in class DynamicType.Builder.AbstractBase.Delegator<U>
public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> intercept(Implementation implementation)
intercept
in interface DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>
implementation
- The implementation for implementing the previously defined or matched method.public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> withoutCode()
abstract
unless it was already declared to be native
.withoutCode
in interface DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>
public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> defaultValue(AnnotationValue<?,?> annotationValue)
EnumerationDescription
,
types as TypeDescription
and annotations as AnnotationDescription
. For supplying loaded types, use
DynamicType.Builder.MethodDefinition.ImplementationDefinition.defaultValue(Object, Class)
must be used.defaultValue
in interface DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>
annotationValue
- The value to be defined as a default value.public <V> DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> defaultValue(V value, java.lang.Class<? extends V> type)
defaultValue
in interface DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>
V
- The type of the annotation property.value
- The value to be defined as a default value.type
- The type of the annotation property.private DynamicType.Builder.MethodDefinition.ImplementationDefinition<U> interfaceType()