src/main/java/org/plumelib/bcelutil/BcelUtil.java
public static boolean isMain(MethodGen mg) {
    Type[] argTypes = mg.getArgumentTypes();
    return mg.isStatic()
        && (mg.getReturnType() == Type.VOID)
        && mg.getName().equals("main")
        && (argTypes.length == 1)
        && argTypes[0].equals(stringArray);
  }
public static boolean isMain(MethodGen mg) {
    Type[] argTypes = mg.getArgumentTypes();
    return mg.isStatic()
        && (mg.getReturnType() == Type.VOID)
        && mg.getName().equals("main")
        && (argTypes.length == 1)
        && argTypes[0].equals(stringArray);
  }
public static boolean isMain ( MethodGen mg ) { Type [ ] argTypes = mg . getArgumentTypes ( ) ; return mg . isStatic ( ) && ( mg . getReturnType ( ) == Type . VOID ) && mg . getName ( ) . equals ( "main" ) && ( argTypes . length == 1 ) && argTypes [ 0 ] . equals ( stringArray ) ; }
Returns whether or not this is a standard main method (static, void, name is 'main', and one
formal parameter: a string array).

@param mg the method to check
@return true iff the method is a main method
Returns whether or not this is a standard main method ( static void name is main and one formal parameter : a string array ) .