Class MixinClass

java.lang.Object
org.cadixdev.mercury.mixin.annotation.MixinData
org.cadixdev.mercury.mixin.annotation.MixinClass

public class MixinClass extends MixinData
Represents a single mixin, acting as a holder for the annotations on the class.
Since:
0.1.0
  • Field Summary

    Fields inherited from class org.cadixdev.mercury.mixin.annotation.MixinData

    privateTargets, targets
  • Constructor Summary

    Constructors
    Constructor
    Description
    MixinClass(org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding binding, org.cadixdev.lorenz.MappingSet mappings, org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding[] targets, String[] privateTargets, Map<String,org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding> implementsData)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyFieldMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.FieldSignature signature, Function<String,String> deobfProcessor)
    Copies the relevant mapping from the target's mappings, if such information exists.
    void
    copyFieldMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.FieldSignature mixinSignature, org.cadixdev.bombe.type.signature.FieldSignature targetSignature, Function<String,String> deobfProcessor)
    Copies the relevant mapping from the target's mappings, if such information exists.
    void
    copyMethodMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.MethodSignature signature, Function<String,String> deobfProcessor)
    Copies the relevant mapping from the target's mappings, if such information exists.
    void
    copyMethodMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.MethodSignature mixinSignature, org.cadixdev.bombe.type.signature.FieldSignature targetSignature, Function<String,String> deobfProcessor)
    Copies the relevant mapping from the target's mappings, if such information exists.
    void
    copyMethodMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.MethodSignature mixinSignature, org.cadixdev.bombe.type.signature.MethodSignature targetSignature, Function<String,String> deobfProcessor)
    Copies the relevant mapping from the target's mappings, if such information exists.
    static MixinClass
    fetch(org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding declaringClass, org.cadixdev.lorenz.MappingSet mappings)
     
    org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding
    Gets the binding for the mixin class.
    Map<String,org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding>
     
    org.cadixdev.lorenz.model.ClassMapping<?,?>
    Gets the mapping for this mixin class, creating the mapping on-demand.
    Gets the binary names of all the mixin's targets, both public and private.

    Methods inherited from class org.cadixdev.mercury.mixin.annotation.MixinData

    fetch, from, getPrivateTargets, getPublicTargets, getTargets

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MixinClass

      public MixinClass(org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding binding, org.cadixdev.lorenz.MappingSet mappings, org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding[] targets, String[] privateTargets, Map<String,org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding> implementsData)
  • Method Details

    • fetch

      public static MixinClass fetch(org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding declaringClass, org.cadixdev.lorenz.MappingSet mappings)
    • getBinding

      public org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding getBinding()
      Gets the binding for the mixin class.
      Returns:
      The mixin binding
    • getTargetNames

      public String[] getTargetNames()
      Gets the binary names of all the mixin's targets, both public and private.
      Returns:
      The targets
    • getImplementsData

      public Map<String,org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.ITypeBinding> getImplementsData()
    • getMixinMapping

      public org.cadixdev.lorenz.model.ClassMapping<?,?> getMixinMapping()
      Gets the mapping for this mixin class, creating the mapping on-demand.
      Returns:
      The mapping
    • copyFieldMapping

      public void copyFieldMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.FieldSignature mixinSignature, org.cadixdev.bombe.type.signature.FieldSignature targetSignature, Function<String,String> deobfProcessor)
      Copies the relevant mapping from the target's mappings, if such information exists.

      To facilitate prefixing(/suffixing/etc), you can use a "deobf processor" argument to process the de-obfuscation name applied to the mixin's mapping.

      Parameters:
      targetParent - The class mapping of the mixin's target you wish to copy the given field mapping from
      mixinSignature - The signature of the field in the mixin
      targetSignature - The signature of the field in the target
      deobfProcessor - A processor to alter the de-obfuscation name before it is applied to the copied mapping
    • copyFieldMapping

      public void copyFieldMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.FieldSignature signature, Function<String,String> deobfProcessor)
      Copies the relevant mapping from the target's mappings, if such information exists.

      To facilitate prefixing(/suffixing/etc), you can use a "deobf processor" argument to process the de-obfuscation name applied to the mixin's mapping.

      Parameters:
      targetParent - The class mapping of the mixin's target you wish to copy the given field mapping from
      signature - The signature of the field you wish to copy
      deobfProcessor - A processor to alter the de-obfuscation name before it is applied to the copied mapping
    • copyMethodMapping

      public void copyMethodMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.MethodSignature mixinSignature, org.cadixdev.bombe.type.signature.MethodSignature targetSignature, Function<String,String> deobfProcessor)
      Copies the relevant mapping from the target's mappings, if such information exists.

      To facilitate prefixing(/suffixing/etc), you can use a "deobf processor" argument to process the de-obfuscation name applied to the mixin's mapping.

      Parameters:
      targetParent - The class mapping of the mixin's target you wish to copy the given method mapping from
      mixinSignature - The signature of the field in the mixin
      targetSignature - The signature of the field in the target
      deobfProcessor - A processor to alter the de-obfuscation name before it is applied to the copied mapping
    • copyMethodMapping

      public void copyMethodMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.MethodSignature signature, Function<String,String> deobfProcessor)
      Copies the relevant mapping from the target's mappings, if such information exists.

      To facilitate prefixing(/suffixing/etc), you can use a "deobf processor" argument to process the de-obfuscation name applied to the mixin's mapping.

      Parameters:
      targetParent - The class mapping of the mixin's target you wish to copy the given method mapping from
      signature - The signature of the method you wish to copy
      deobfProcessor - A processor to alter the de-obfuscation name before it is applied to the copied mapping
    • copyMethodMapping

      public void copyMethodMapping(org.cadixdev.lorenz.model.ClassMapping<?,?> targetParent, org.cadixdev.bombe.type.signature.MethodSignature mixinSignature, org.cadixdev.bombe.type.signature.FieldSignature targetSignature, Function<String,String> deobfProcessor)
      Copies the relevant mapping from the target's mappings, if such information exists.

      To facilitate prefixing(/suffixing/etc), you can use a "deobf processor" argument to process the de-obfuscation name applied to the mixin's mapping.

      Parameters:
      targetParent - The class mapping of the mixin's target you wish to copy the given mapping from
      mixinSignature - The signature of the field in the mixin
      targetSignature - The signature of the field in the target
      deobfProcessor - A processor to alter the de-obfuscation name before it is applied to the copied mapping