public static < T > T getExtra ( Bundle extras , String name , boolean nullable ) { T value = null ; if ( extras != null && extras . containsKey ( name ) ) { value = ( T ) extras . get ( name ) ; } if ( ! nullable && value == null ) { throw new TransfuseInjectionException ( "Unable to access Extra " + name ) ; } return value ; }
Returns the extras in the given bundle by name . If no extra is found and the extra is considered not nullable this method will throw a TransfuseInjectionException . If no extra is found and the extra is considered nullable this method will of course return null .