public VariableElement getLocalVariable ( int index ) { int idx = 0 ; for ( VariableElement lv : localVariables ) { if ( idx == index ) { return lv ; } if ( Typ . isCategory2 ( lv . asType ( ) ) ) { idx += 2 ; } else { idx ++ ; } } throw new IllegalArgumentException ( "local variable at index " + index + " not found" ) ; }
Returns local variable at index . Note! long and double take two positions .