[ https://issues.apache.org/jira/browse/GROOVY-10123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-10123: --------------------------------- Description: There are a number of methods presented for collecting interfaces, each with some subtle difference. {code:java} // interface collection org.codehaus.groovy.ast.tools.GeneralUtils#getInterfacesAndSuperInterfaces(ClassNode) // if parameter is interface, returns singleton set org.codehaus.groovy.ast.ClassNode#getAllInterfaces() // includes this, excludes super types org.codehaus.groovy.transform.trait.Traits.collectAllInterfacesReverseOrder(ClassNode, LinkedHashSet<ClassNode>) // parameterizes results org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.collectAllInterfaces(ClassNode) // unused by current codebase; redundant with GeneralUtils#getInterfacesAndSuperInterfaces // method collection org.codehaus.groovy.ast.ClassNode#getAllDeclaredMethods() // deduplicated by MethodNode#getTypeDescriptor() which keeps bridge/synthetics instead of overridden org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.collectAllInterfaceMethodsByName(ClassNode, String, List<MethodNode>) // non-static and available only to subclasses org.apache.groovy.ast.tools.ClassNodeUtils.addDeclaredMethodsFromInterfaces(ClassNode, Map<String, MethodNode>) // non-synthetic already org.apache.groovy.ast.tools.ClassNodeUtils.addDeclaredMethodsFromAllInterfaces(ClassNode, Map<String, MethodNode>) // includes synthetics, not all interfaces {code} was: There are a number of methods presented for collecting interfaces, each with some subtle difference. {code:java} org.codehaus.groovy.ast.tools.GeneralUtils.getInterfacesAndSuperInterfaces(ClassNode) // if parameter is interface, returns singleton set org.codehaus.groovy.ast.ClassNode.getAllInterfaces() // includes this, excludes super types org.codehaus.groovy.transform.trait.Traits.collectAllInterfacesReverseOrder(ClassNode, LinkedHashSet<ClassNode>) // parameterizes results org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.collectAllInterfaces(ClassNode) org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.collectAllInterfaceMethodsByName(ClassNode, String, List<MethodNode>) // non-static and available only to subclasses org.apache.groovy.ast.tools.ClassNodeUtils.addDeclaredMethodsFromInterfaces(ClassNode, Map<String, MethodNode>) // non-synthetic already org.apache.groovy.ast.tools.ClassNodeUtils.addDeclaredMethodsFromAllInterfaces(ClassNode, Map<String, MethodNode>) // includes synthetics, not all interfaces {code} > Consolidate methods for collecting interfaces > --------------------------------------------- > > Key: GROOVY-10123 > URL: https://issues.apache.org/jira/browse/GROOVY-10123 > Project: Groovy > Issue Type: Improvement > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Minor > Labels: breaking > > There are a number of methods presented for collecting interfaces, each with > some subtle difference. > {code:java} > // interface collection > org.codehaus.groovy.ast.tools.GeneralUtils#getInterfacesAndSuperInterfaces(ClassNode) > // if parameter is interface, returns singleton set > org.codehaus.groovy.ast.ClassNode#getAllInterfaces() // includes this, > excludes super types > org.codehaus.groovy.transform.trait.Traits.collectAllInterfacesReverseOrder(ClassNode, > LinkedHashSet<ClassNode>) // parameterizes results > org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.collectAllInterfaces(ClassNode) > // unused by current codebase; redundant with > GeneralUtils#getInterfacesAndSuperInterfaces > // method collection > org.codehaus.groovy.ast.ClassNode#getAllDeclaredMethods() // deduplicated by > MethodNode#getTypeDescriptor() which keeps bridge/synthetics instead of > overridden > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.collectAllInterfaceMethodsByName(ClassNode, > String, List<MethodNode>) // non-static and available only to subclasses > org.apache.groovy.ast.tools.ClassNodeUtils.addDeclaredMethodsFromInterfaces(ClassNode, > Map<String, MethodNode>) // non-synthetic already > org.apache.groovy.ast.tools.ClassNodeUtils.addDeclaredMethodsFromAllInterfaces(ClassNode, > Map<String, MethodNode>) // includes synthetics, not all interfaces > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)