final ImmutableBiMap < String , ExecutableElement > propertyNameToMethodMap ( Set < ExecutableElement > propertyMethods ) { Map < String , ExecutableElement > map = new LinkedHashMap <> ( ) ; Set < String > reportedDups = new HashSet <> ( ) ; boolean allPrefixed = gettersAllPrefixed ( propertyMethods ) ; for ( ExecutableElement method : propertyMethods ) { String methodName = method . getSimpleName ( ) . toString ( ) ; String name = allPrefixed ? nameWithoutPrefix ( methodName ) : methodName ; ExecutableElement old = map . put ( name , method ) ; if ( old != null ) { String message = "More than one @" + simpleAnnotationName + " property called " + name ; errorReporter . reportError ( message , method ) ; if ( reportedDups . add ( name ) ) { errorReporter . reportError ( message , old ) ; } } } return ImmutableBiMap . copyOf ( map ) ; }
Returns a bi - map between property names and the corresponding abstract property methods .