Class KotlinWhenFilter

  • All Implemented Interfaces:
    IFilter

    public final class KotlinWhenFilter
    extends java.lang.Object
    implements IFilter
    Filters bytecode that Kotlin compiler generates for when expressions which list all cases of enum or sealed class, i.e. which don't require explicit else.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  KotlinWhenFilter.Matcher  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String EXCEPTION  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void filter​(org.objectweb.asm.tree.MethodNode methodNode, IFilterContext context, IFilterOutput output)
      This method is called for every method.
      private static org.objectweb.asm.tree.LabelNode getDefaultLabel​(org.objectweb.asm.tree.AbstractInsnNode i)  
      private static void ignoreDefaultBranch​(org.objectweb.asm.tree.AbstractInsnNode switchNode, IFilterOutput output)  
      • Methods inherited from class java.lang.Object

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

      • KotlinWhenFilter

        public KotlinWhenFilter()
    • Method Detail

      • filter

        public void filter​(org.objectweb.asm.tree.MethodNode methodNode,
                           IFilterContext context,
                           IFilterOutput output)
        Description copied from interface: IFilter
        This method is called for every method. The filter implementation is expected to inspect the provided method and report its result to the given IFilterOutput instance.
        Specified by:
        filter in interface IFilter
        Parameters:
        methodNode - method to inspect
        context - context information for the method
        output - callback to report filtering results to
      • getDefaultLabel

        private static org.objectweb.asm.tree.LabelNode getDefaultLabel​(org.objectweb.asm.tree.AbstractInsnNode i)
      • ignoreDefaultBranch

        private static void ignoreDefaultBranch​(org.objectweb.asm.tree.AbstractInsnNode switchNode,
                                                IFilterOutput output)