Class MixinExtrasServiceImpl

java.lang.Object
com.llamalad7.mixinextras.service.MixinExtrasServiceImpl
All Implemented Interfaces:
MixinExtrasService

public class MixinExtrasServiceImpl extends Object implements MixinExtrasService
  • Constructor Details

    • MixinExtrasServiceImpl

      public MixinExtrasServiceImpl()
  • Method Details

    • getVersion

      public int getVersion()
      Specified by:
      getVersion in interface MixinExtrasService
    • shouldReplace

      public boolean shouldReplace(Object otherService)
      Specified by:
      shouldReplace in interface MixinExtrasService
    • takeControlFrom

      public void takeControlFrom(Object olderService)
      Specified by:
      takeControlFrom in interface MixinExtrasService
    • concedeTo

      public void concedeTo(Object newerService, boolean wasActive)
      Specified by:
      concedeTo in interface MixinExtrasService
    • offerPackage

      public void offerPackage(int version, String packageName)
      Specified by:
      offerPackage in interface MixinExtrasService
    • offerExtension

      public void offerExtension(int version, org.spongepowered.asm.mixin.transformer.ext.IExtension extension)
      Specified by:
      offerExtension in interface MixinExtrasService
    • offerInjector

      public void offerInjector(int version, Class<? extends org.spongepowered.asm.mixin.injection.struct.InjectionInfo> injector)
      Specified by:
      offerInjector in interface MixinExtrasService
    • offerInjectionPoint

      public void offerInjectionPoint(int version, Class<? extends org.spongepowered.asm.mixin.injection.InjectionPoint> point)
      Specified by:
      offerInjectionPoint in interface MixinExtrasService
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • initialize

      public void initialize()
      Specified by:
      initialize in interface MixinExtrasService
    • changePackage

      public org.objectweb.asm.Type changePackage(Class<?> ourType, org.objectweb.asm.Type theirReference, Class<?> ourReference)
    • getAllClassNames

      public Set<String> getAllClassNames(String ourName)
    • getPackageGeneration

      public int getPackageGeneration()
      The number of MixinExtras instances known so far including our own. Anything which has to cache a value derived from the whole set of instances, and cannot recompute it later, should key that cache on this so a newly registered instance gets a fresh one.
    • ourNameFor

      public String ourNameFor(String name)
      Translates a class belonging to any known MixinExtras instance into the equivalent name in our own package, or returns null if it belongs to none of them. Accepts a . format name.

      Prefer this over snapshotting getAllClassNames(String) into a static map. As the known package set grows as instances register themselves, static maps will become stale.

    • ourDescriptorFor

      public String ourDescriptorFor(String desc)
      As ourNameFor(String), for a type descriptor.
    • getAllClassNamesAtLeast

      public Set<String> getAllClassNamesAtLeast(String ourName, MixinExtrasVersion minVersion)
    • isClassOwned

      public boolean isClassOwned(String name)
      Returns whether this class belongs to some MixinExtras instance. Accepts a . format name.