public boolean isAssignableFrom ( Key < ? super T > key ) { Objects . requireNonNull ( key ) ; for ( Class < ? extends Annotation > annType : _annTypes ) { if ( ! containsType ( annType , key . _annTypes ) ) { return false ; } } if ( _type instanceof ParameterizedType ) { if ( ! ( key . _type instanceof ParameterizedType ) ) { return false ; } if ( ! isAssignableFrom ( ( ParameterizedType ) _type , ( ParameterizedType ) key . _type ) ) { return false ; } } if ( _anns . length > 0 && key . _anns . length > 0 ) { return isAssignableFrom ( _anns , key . _anns ) ; } return true ; }
Tests if key is assignable . Key is considered assignable if annotation types match Type matches and annotation instances match .