15 lines
317 B
Bash
15 lines
317 B
Bash
|
#!/bin/bash
|
||
|
generateMethod () {
|
||
|
local name="${1}"
|
||
|
echo -e " public void method_${name}(){\n System.out.println(\"method_${name}\");\n }"
|
||
|
}
|
||
|
|
||
|
cat > Test.java <<EOF
|
||
|
public class Test {
|
||
|
$(for s in `seq 1 100`; do generateMethod ${s}; done)
|
||
|
}
|
||
|
EOF
|
||
|
|
||
|
javac -source 1.8 -target 1.8 Test.java
|
||
|
rm Test.java
|