Package codechicken.mixin.api
Class MixinLanguageSupport.JavaMixinLanguageSupport
java.lang.Object
codechicken.mixin.api.MixinLanguageSupport.JavaMixinLanguageSupport
- All Implemented Interfaces:
MixinLanguageSupport
- Enclosing interface:
- MixinLanguageSupport
public static class MixinLanguageSupport.JavaMixinLanguageSupport
extends Object
implements MixinLanguageSupport
The default java handling for MixinCompiler.
-
Nested Class Summary
Nested classes/interfaces inherited from interface codechicken.mixin.api.MixinLanguageSupport
MixinLanguageSupport.JavaMixinLanguageSupport, MixinLanguageSupport.LanguageName, MixinLanguageSupport.SortingIndex -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildMixinTrait(org.objectweb.asm.tree.ClassNode cNode) Tries to build aMixinInfofor the givenClassNode.obtainInfo(org.objectweb.asm.tree.ClassNode cNode) Tries to load aClassInfofor the givenClassNode.voidsetTraitGeneratorFactory(BiFunction<MixinCompiler, org.objectweb.asm.tree.ClassNode, JavaTraitGenerator> factory)
-
Field Details
-
mixinCompiler
-
-
Constructor Details
-
JavaMixinLanguageSupport
-
-
Method Details
-
setTraitGeneratorFactory
public void setTraitGeneratorFactory(BiFunction<MixinCompiler, org.objectweb.asm.tree.ClassNode, JavaTraitGenerator> factory) -
obtainInfo
Description copied from interface:MixinLanguageSupportTries to load aClassInfofor the givenClassNode. Custom implementations shouldn't be greedy, only load aClassInfoif you know for certain that you need to. I.e:MixinScalaLanguageSupport, only loads aScalaClassInfoif the class has a ScalaSignature Annotation, and is a Scala trait class.- Specified by:
obtainInfoin interfaceMixinLanguageSupport- Parameters:
cNode- The ClassNode.- Returns:
- The ClassInfo.
-
buildMixinTrait
Description copied from interface:MixinLanguageSupportTries to build aMixinInfofor the givenClassNode. as withMixinLanguageSupport.obtainInfo(org.objectweb.asm.tree.ClassNode), only load MixinInfos if you know for certain that you need to. I.e:MixinScalaLanguageSupport, will only load a MixinInfo for the class, ifMixinCompiler.getClassInfo(ClassNode)resolves to aScalaClassInfo.- Specified by:
buildMixinTraitin interfaceMixinLanguageSupport- Parameters:
cNode- The ClassNode.- Returns:
- The MixinInfo.
-