Class MixinClass
- Since:
- 0.1.0
-
Field Summary
Fields inherited from class org.cadixdev.mercury.mixin.annotation.MixinData
privateTargets, targets -
Constructor Summary
ConstructorsConstructorDescriptionMixinClass(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 TypeMethodDescriptionvoidcopyFieldMapping(org.cadixdev.lorenz.model.ClassMapping<?, ?> targetParent, org.cadixdev.bombe.type.signature.FieldSignature signature, Function<String, String> deobfProcessor) Copies the relevantmappingfrom the target'smappings, if such information exists.voidcopyFieldMapping(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 relevantmappingfrom the target'smappings, if such information exists.voidcopyMethodMapping(org.cadixdev.lorenz.model.ClassMapping<?, ?> targetParent, org.cadixdev.bombe.type.signature.MethodSignature signature, Function<String, String> deobfProcessor) Copies the relevantmappingfrom the target'smappings, if such information exists.voidcopyMethodMapping(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 relevantmappingfrom the target'smappings, if such information exists.voidcopyMethodMapping(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 relevantmappingfrom the target'smappings, if such information exists.static MixinClassfetch(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.ITypeBindingGets the binding for the mixin class.org.cadixdev.lorenz.model.ClassMapping<?,?> Gets themappingfor this mixin class, creating the mapping on-demand.String[]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
-
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
Gets the binary names of all the mixin's targets, both public and private.- Returns:
- The targets
-
getImplementsData
-
getMixinMapping
public org.cadixdev.lorenz.model.ClassMapping<?,?> getMixinMapping()Gets themappingfor 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 relevantmappingfrom the target'smappings, 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- Theclass mappingof the mixin's target you wish to copy the given field mapping frommixinSignature- Thesignatureof the field in the mixintargetSignature- Thesignatureof the field in the targetdeobfProcessor- 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 relevantmappingfrom the target'smappings, 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- Theclass mappingof the mixin's target you wish to copy the given field mapping fromsignature- Thesignatureof the field you wish to copydeobfProcessor- 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 relevantmappingfrom the target'smappings, 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- Theclass mappingof the mixin's target you wish to copy the given method mapping frommixinSignature- Thesignatureof the field in the mixintargetSignature- Thesignatureof the field in the targetdeobfProcessor- 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 relevantmappingfrom the target'smappings, 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- Theclass mappingof the mixin's target you wish to copy the given method mapping fromsignature- Thesignatureof the method you wish to copydeobfProcessor- 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 relevantmappingfrom the target'smappings, 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- Theclass mappingof the mixin's target you wish to copy the given mapping frommixinSignature- Thesignatureof the field in the mixintargetSignature- Thesignatureof the field in the targetdeobfProcessor- A processor to alter the de-obfuscation name before it is applied to the copied mapping
-