Class RecordsFilter.Matcher

    • Constructor Detail

      • Matcher

        private Matcher()
    • Method Detail

      • isToString

        boolean isToString​(org.objectweb.asm.tree.MethodNode m)
      • isHashCode

        boolean isHashCode​(org.objectweb.asm.tree.MethodNode m)
      • isFieldAccessor

        boolean isFieldAccessor​(org.objectweb.asm.tree.MethodNode m)
        Criteria: method name == field name, only three instructions (aload0, getField, return), and note that this class only happens in a record, so it's safe to assume that this is the record field accessor generated. It may happen that the code is explicitly written by the developer and is intentionally kept the same as the default generated format, but that's just trivial code, and it still makes sense to filter them out anyway.

        Exception: if the code is compiled within IntelliJ IDEA's Java instrumentation, there will be extra null-assertion instructions after the getField instruction. This case is ignored.

      • isEquals

        boolean isEquals​(org.objectweb.asm.tree.MethodNode m)
      • nextIsInvokeDynamic

        private void nextIsInvokeDynamic​(java.lang.String name)