}
}
private SourceMethod getReverseMappingMethod(List<SourceMethod> rawMethods, SourceMethod method) {
SourceMethod result = null;
InheritInverseConfigurationPrism reversePrism = InheritInverseConfigurationPrism.getInstanceOn(
method.getExecutable()
);
if ( reversePrism != null ) {
// method is configured as being reverse method, collect candidates
List<SourceMethod> candidates = new ArrayList<SourceMethod>();
for ( SourceMethod oneMethod : rawMethods ) {
if ( oneMethod.reverses( method ) ) {
candidates.add( oneMethod );
}
}
String name = reversePrism.name();
if ( candidates.size() == 1 ) {
// no ambiguity: if no configuredBy is specified, or configuredBy specified and match
if ( name.isEmpty() ) {
result = candidates.get( 0 );
}