src/main/java/org/plumelib/bcelutil/BcelUtil.java
public static String localVariablesToString(MethodGen mg) {

    StringBuilder out = new StringBuilder();
    out.append(String.format("Locals for %s [cnt %d]%n", mg, mg.getMaxLocals()));
    LocalVariableGen[] lvgs = mg.getLocalVariables();
    if ((lvgs != null) && (lvgs.length > 0)) {
      for (LocalVariableGen lvg : lvgs) {
        out.append(String.format("  %s [index %d]%n", lvg, lvg.getIndex()));
      }
    }
    return out.toString();
  }
public static String localVariablesToString(MethodGen mg) {

    StringBuilder out = new StringBuilder();
    out.append(String.format("Locals for %s [cnt %d]%n", mg, mg.getMaxLocals()));
    LocalVariableGen[] lvgs = mg.getLocalVariables();
    if ((lvgs != null) && (lvgs.length > 0)) {
      for (LocalVariableGen lvg : lvgs) {
        out.append(String.format("  %s [index %d]%n", lvg, lvg.getIndex()));
      }
    }
    return out.toString();
  }
public static String localVariablesToString ( MethodGen mg ) { StringBuilder out = new StringBuilder ( ) ; out . append ( String . format ( "Locals for %s [cnt %d]%n" , mg , mg . getMaxLocals ( ) ) ) ; LocalVariableGen [ ] lvgs = mg . getLocalVariables ( ) ; if ( ( lvgs != null ) && ( lvgs . length > 0 ) ) { for ( LocalVariableGen lvg : lvgs ) { out . append ( String . format ( "  %s [index %d]%n" , lvg , lvg . getIndex ( ) ) ) ; } } return out . toString ( ) ; }
Return a description of the local variables (one per line).

@param mg the method whose local variables to describe
@return a description of the local variables (one per line)
Return a description of the local variables ( one per line ) .