Class AccessMethodDatabase


  • public class AccessMethodDatabase
    extends java.lang.Object
    A database of calls to "access" methods, i.e. the methods generated by the compiler when an inner class calls a method on its outer class Somewhat similar to InnerClassAccessMap
    • Constructor Detail

      • AccessMethodDatabase

        public AccessMethodDatabase()
    • Method Detail

      • addAccessMethod

        public void addAccessMethod​(MethodDescriptor accessMethod,
                                    MethodDescriptor callerMethod,
                                    SourceLineAnnotation sourceLineAnnotation)
        Parameters:
        accessMethod - The method descriptor for the access method
        callerMethod - The method descriptor for the inner class' "real" method
        sourceLineAnnotation - The annotation for the location where the inner class is calling the access method
      • getAccessMethodLocations

        @NonNull
        public java.util.List<AccessMethodDatabase.AccessMethodLocation> getAccessMethodLocations​(MethodDescriptor accessMethod)
        Parameters:
        accessMethod - The method descriptor for the access method
        Returns:
        The locations of the access method caller(s) i.e. the "real" methods in the inner class