protected Class replaceWithMappedTypeForPath ( final Class target ) { if ( mappings == null ) { return target ; } Class newType ; // first try alt paths Path altPath = path . getAltPath ( ) ; if ( altPath != null ) { if ( ! altPath . equals ( path ) ) { newType = mappings . get ( altPath ) ; if ( newType != null ) { return newType ; } } } // now check regular paths newType = mappings . get ( path ) ; if ( newType != null ) { return newType ; } return target ; }
Replaces type with mapped type for current path .