Build -> little change when method is empty
This commit is contained in:
parent
97aa0ac391
commit
9b41348588
10 changed files with 5 additions and 10 deletions
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java;
|
package be.jeffcheasey88.peeratcode.parser.java;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -102,9 +102,13 @@ public class Function extends OperationContainer{
|
||||||
|
|
||||||
final String paramMod = param;
|
final String paramMod = param;
|
||||||
|
|
||||||
buffer.append((s) -> s+=Modifier.toString(modifier)+" "+(constructor ? "" : returnType+" ")+name+"("+paramMod+") "+exceptions+"{");
|
boolean empty = getChilds().size() == 0;
|
||||||
|
|
||||||
|
buffer.append((s) -> s+=Modifier.toString(modifier)+" "+(constructor ? "" : returnType+" ")+name+"("+paramMod+") "+exceptions+"{"+((empty ? "}":"")));
|
||||||
buffer.add("");
|
buffer.add("");
|
||||||
|
|
||||||
|
if(empty) return;
|
||||||
|
|
||||||
for(JavaElement child : getChilds()) child.build(buffer, tab+1);
|
for(JavaElement child : getChilds()) child.build(buffer, tab+1);
|
||||||
|
|
||||||
super.build(buffer, tab);
|
super.build(buffer, tab);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java;
|
package be.jeffcheasey88.peeratcode.parser.java;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
package be.jeffcheasey88.peeratcode.parser.java.operations;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue