Class DynamicType.Builder.MethodDefinition.AbstractBase<U>

Type Parameters:
U - A loaded type that the built type is guaranteed to be a subclass of.
All Implemented Interfaces:
DynamicType.Builder<U>, DynamicType.Builder.MethodDefinition<U>
Direct Known Subclasses:
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition.AbstractBase
Enclosing interface:
DynamicType.Builder.MethodDefinition<S>

public abstract static class DynamicType.Builder.MethodDefinition.AbstractBase<U> extends DynamicType.Builder.AbstractBase.Delegator<U> implements DynamicType.Builder.MethodDefinition<U>
An abstract base implementation of a method definition.
  • Constructor Details

    • AbstractBase

      public AbstractBase()
  • Method Details

    • annotateMethod

      public DynamicType.Builder.MethodDefinition<U> annotateMethod(Annotation... annotation)
      Annotates the previously defined or matched method with the supplied annotations.
      Specified by:
      annotateMethod in interface DynamicType.Builder.MethodDefinition<U>
      Parameters:
      annotation - The annotations to declare on the previously defined or matched method.
      Returns:
      A new builder that is equal to this builder but with the given annotations declared on the previously defined or matched method.
    • annotateMethod

      public DynamicType.Builder.MethodDefinition<U> annotateMethod(List<? extends Annotation> annotations)
      Annotates the previously defined or matched method with the supplied annotations.
      Specified by:
      annotateMethod in interface DynamicType.Builder.MethodDefinition<U>
      Parameters:
      annotations - The annotations to declare on the previously defined or matched method.
      Returns:
      A new builder that is equal to this builder but with the given annotations declared on the previously defined or matched method.
    • annotateMethod

      public DynamicType.Builder.MethodDefinition<U> annotateMethod(AnnotationDescription... annotation)
      Annotates the previously defined or matched method with the supplied annotations.
      Specified by:
      annotateMethod in interface DynamicType.Builder.MethodDefinition<U>
      Parameters:
      annotation - The annotations to declare on the previously defined or matched method.
      Returns:
      A new builder that is equal to this builder but with the given annotations declared on the previously defined or matched method.
    • annotateParameter

      public DynamicType.Builder.MethodDefinition<U> annotateParameter(int index, Annotation... annotation)
      Annotates the parameter of the given index of the previously defined or matched method with the supplied annotations.
      Specified by:
      annotateParameter in interface DynamicType.Builder.MethodDefinition<U>
      Parameters:
      index - The parameter's index.
      annotation - The annotations to declare on the previously defined or matched method.
      Returns:
      A new builder that is equal to this builder but with the given annotations declared on the previously defined or matched method's parameter of the given index.
    • annotateParameter

      public DynamicType.Builder.MethodDefinition<U> annotateParameter(int index, List<? extends Annotation> annotations)
      Annotates the parameter of the given index of the previously defined or matched method with the supplied annotations.
      Specified by:
      annotateParameter in interface DynamicType.Builder.MethodDefinition<U>
      Parameters:
      index - The parameter's index.
      annotations - The annotations to declare on the previously defined or matched method.
      Returns:
      A new builder that is equal to this builder but with the given annotations declared on the previously defined or matched method's parameter of the given index.
    • annotateParameter

      public DynamicType.Builder.MethodDefinition<U> annotateParameter(int index, AnnotationDescription... annotation)
      Annotates the parameter of the given index of the previously defined or matched method with the supplied annotations.
      Specified by:
      annotateParameter in interface DynamicType.Builder.MethodDefinition<U>
      Parameters:
      index - The parameter's index.
      annotation - The annotations to declare on the previously defined or matched method.
      Returns:
      A new builder that is equal to this builder but with the given annotations declared on the previously defined or matched method's parameter of the given index.