private Map < String , Set < String > > buildConstrainingInfo ( JavaClass cls , Method m ) throws ClassNotFoundException { Map < String , Set < String > > constraintInfo = new HashMap <> ( ) ; Set < String > exs = new HashSet <> ( ) ; ExceptionTable et = m . getExceptionTable ( ) ; if ( et != null ) { int [ ] indexTable = et . getExceptionIndexTable ( ) ; ConstantPool pool = cls . getConstantPool ( ) ; for ( int index : indexTable ) { if ( index != 0 ) { ConstantClass ccls = ( ConstantClass ) pool . getConstant ( index ) ; String exName = ccls . getBytes ( pool ) ; JavaClass exClass = Repository . lookupClass ( exName ) ; if ( ! exClass . instanceOf ( runtimeClass ) ) { exs . add ( ccls . getBytes ( pool ) ) ; } } } } constraintInfo . put ( cls . getClassName ( ) , exs ) ; return constraintInfo ; }
returns exception names describing what exceptions are allowed to be thrown