private void createValidation ( Class < ? > vaultClass , Class < ? > assetClass , Class < ? > idClass ) { for ( Method method : vaultClass . getMethods ( ) ) { if ( ! method . getName ( ) . startsWith ( "create" ) ) { continue ; } if ( ! Modifier . isAbstract ( method . getModifiers ( ) ) ) { continue ; } TypeRef resultRef = findResult ( method . getParameters ( ) ) ; if ( resultRef == null ) { continue ; } TypeRef typeRef = resultRef . to ( Result . class ) . param ( 0 ) ; Class < ? > typeClass = typeRef . rawClass ( ) ; // id return type if ( unbox ( idClass ) . equals ( unbox ( typeClass ) ) ) { continue ; } if ( void . class . equals ( unbox ( typeClass ) ) ) { continue ; } try { new ShimConverter <> ( assetClass , typeClass ) ; } catch ( Exception e ) { throw error ( e , "{0}.{1}: {2}" , vaultClass . getSimpleName ( ) , method . getName ( ) , e . getMessage ( ) ) ; } } }
Validate the create methods .