Class MethodScanner.PartMap

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.String>, java.util.Map<java.lang.String,​MethodPart>
    Enclosing class:
    MethodScanner

    private static class MethodScanner.PartMap
    extends java.util.LinkedHashMap<java.lang.String,​MethodPart>
    implements java.lang.Iterable<java.lang.String>
    The PartMap is used to contain method parts using the Java Bean method name for the part. This ensures that the scanned and extracted methods can be acquired using a common name, which should be the parsed Java Bean method name.
    See Also:
    MethodPart
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PartMap()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<java.lang.String> iterator()
      This returns an iterator for the Java Bean method names for the MethodPart objects that are stored in the map.
      MethodPart take​(java.lang.String name)
      This is used to acquire the method part for the specified method name.
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • PartMap

        private PartMap()
    • Method Detail

      • iterator

        public java.util.Iterator<java.lang.String> iterator()
        This returns an iterator for the Java Bean method names for the MethodPart objects that are stored in the map. This allows names to be iterated easily in a for loop.
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.String>
        Returns:
        this returns an iterator for the method name keys
      • take

        public MethodPart take​(java.lang.String name)
        This is used to acquire the method part for the specified method name. This will remove the method part from this map so that it can be checked later to ensure what remains.
        Parameters:
        name - this is the method name to get the method with
        Returns:
        this returns the method part for the given key