private static JClassType findFirstTypeToApplyPropertyAnnotation( List<JMapperType> mapperTypeList ) {
        if ( mapperTypeList.isEmpty() ) {
            return null;
        }

        List<JMapperType> subLevel = new ArrayList<JMapperType>();
        for ( JMapperType mapperType : mapperTypeList ) {
            if ( mapperType.isBeanMapper() ) {
                return mapperType.getType().isClass();
            } else if ( mapperType.getParameters().size() > 0 ) {
                subLevel.addAll( mapperType.getParameters() );
            }
        }

        return findFirstTypeToApplyPropertyAnnotation( subLevel );
    }
private static JClassType findFirstTypeToApplyPropertyAnnotation ( List < JMapperType > mapperTypeList ) { if ( mapperTypeList . isEmpty ( ) ) { return null ; } List < JMapperType > subLevel = new ArrayList < JMapperType > ( ) ; for ( JMapperType mapperType : mapperTypeList ) { if ( mapperType . isBeanMapper ( ) ) { return mapperType . getType ( ) . isClass ( ) ; } else if ( mapperType . getParameters ( ) . size ( ) > 0 ) { subLevel . addAll ( mapperType . getParameters ( ) ) ; } } return findFirstTypeToApplyPropertyAnnotation ( subLevel ) ; }
@param mapperTypeList the types to search inside

@return the first bean type encountered