Package org.stianloader.micromixin.transform.internal.annotation

## Class AbstractOverlayAnnotation<T extends ClassMemberStub>

- java.lang.Object
- - org.stianloader.micromixin.transform.internal.annotation.MixinAnnotation<T>
  - - org.stianloader.micromixin.transform.internal.annotation.AbstractOverlayAnnotation<T>

- All Implemented Interfaces:
    `java.lang.Comparable<MixinAnnotation<T>>`
  Direct Known Subclasses:
    `MixinOverwriteAnnotation`, `MixinUniqueAnnotation`, `VirtualFieldOverlayAnnotation`

      public abstract class AbstractOverlayAnnotation<T extends ClassMemberStub>
      extends MixinAnnotation<T>

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected MixinLoggingFacade` | `logger` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractOverlayAnnotation​(MixinLoggingFacade logger)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `apply​(org.objectweb.asm.tree.ClassNode to, HandlerContextHelper hctx, MixinStub sourceStub, T source, SimpleRemapper remapper, java.lang.StringBuilder sharedBuilder)` |
    `void` | `collectMappings​(T source, HandlerContextHelper hctx, org.objectweb.asm.tree.ClassNode target, SimpleRemapper remapper, java.lang.StringBuilder sharedBuilder)` |
    `abstract java.lang.String` | `getDesiredName​(T source, org.objectweb.asm.tree.ClassNode target, SimpleRemapper remapper, java.lang.StringBuilder sharedBuilder)` |
    `abstract boolean` | `handleCollision​(T source, org.objectweb.asm.tree.ClassNode target, int collidedAccess)` | Method that is called if the source collides with an already existing member.

    - ### Methods inherited from class org.stianloader.micromixin.transform.internal.annotation.MixinAnnotation

      `compareTo, isCompatible, validateMixin`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          @NotNull
          protected final MixinLoggingFacade logger

  - ### Constructor Detail

    - #### AbstractOverlayAnnotation

          public AbstractOverlayAnnotation​(@NotNull
                                           MixinLoggingFacade logger)

  - ### Method Detail

    - #### apply

          public void apply​(@NotNull
                            org.objectweb.asm.tree.ClassNode to,
                            @NotNull
                            HandlerContextHelper hctx,
                            @NotNull
                            MixinStub sourceStub,
                            @NotNull
                            T source,
                            @NotNull
                            SimpleRemapper remapper,
                            @NotNull
                            java.lang.StringBuilder sharedBuilder)

      Specified by:
        `apply` in class `MixinAnnotation<T extends ClassMemberStub>`

    - #### collectMappings

          public void collectMappings​(@NotNull
                                      T source,
                                      @NotNull
                                      HandlerContextHelper hctx,
                                      @NotNull
                                      org.objectweb.asm.tree.ClassNode target,
                                      @NotNull
                                      SimpleRemapper remapper,
                                      @NotNull
                                      java.lang.StringBuilder sharedBuilder)

      Specified by:
        `collectMappings` in class `MixinAnnotation<T extends ClassMemberStub>`

    - #### getDesiredName

          @NotNull
          public abstract java.lang.String getDesiredName​(@NotNull
                                                          T source,
                                                          @NotNull
                                                          org.objectweb.asm.tree.ClassNode target,
                                                          @NotNull
                                                          SimpleRemapper remapper,
                                                          @NotNull
                                                          java.lang.StringBuilder sharedBuilder)

    - #### handleCollision

          public abstract boolean handleCollision​(@NotNull
                                                  T source,
                                                  @NotNull
                                                  org.objectweb.asm.tree.ClassNode target,
                                                  int collidedAccess)

      Method that is called if the source collides with an already existing member.
      Parameters:
        `source` - The source handler
        `target` - The target class
        `collidedAccess` - The access modifiers of the member that already exists.
      Returns:
        True to overwrite the member, false to abort overlaying.