Permalink
Browse files

Merge pull request #8 from kellerkeller/patch-3

Made more expandable
  • Loading branch information...
2 parents eeac707 + 738aeb0 commit cb3b7ab9c1ceea97275eee5fa7f717f07360c911 @Radvendii committed Feb 29, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 StringHolder.java
View
@@ -19,15 +19,10 @@ public StringHolder(){
imports = new ArrayList<String>();
}
/**
- * Takes in a string and returns the updated String that the file should be.
+ * Takes in a string that should be added.
* @param entry The string that is to be added to the file
- * @return the new string that should be compiled into a file.
*/
- String process(String entry){
- add(entry);
- return toFile();
- }
- private void add(String entry){
+ void add(String entry){
entry.matches(" *import .*;");
if (entry.matches(" *import .*;"))
imports.add(entry);
@@ -39,7 +34,11 @@ else if (entry.matches("}.*"))
else
orders.add(entry);
}
- private String toFile(){
+ /**
+ * Returns the updated String that should be compiled
+ * @return the new string that should be compiled into a file.
+ */
+ String toFile(){
String base = "";
base = combine(imports, base);
base = base.concat(" public class " + RunCode.CLASS + "{\n");

0 comments on commit cb3b7ab

Please sign in to comment.