package rmi.rmiSynth.lex;
public class LexBody extends LexStructure {
private String delegObj; private boolean ret; private String code;
private boolean tryCatch;
public LexBody() {
delegObj = "";
code = "";
tryCatch = false;
}
public String getDelegObj() {
return delegObj;
}
public void setDelegObj(String _delegObj) {
this.delegObj = _delegObj;
}
public String doToString() {
String s = "";
if (!delegObj.equals("")) {
s = delegObj + ".";
}
return s;
}
public String getCode() {
return code;
}
public void setCode(String _code) {
this.code = _code;
}
public void setTryCatch(boolean _tryCatch) {
tryCatch = _tryCatch;
}
public boolean isTryCatch() {
return tryCatch;
}
public void setRet(boolean _ret) {
ret = _ret;
}
public boolean isRet() {
return ret;
}
public String retToString() {
return ret ? "return " : "";
}
public String toString() {
String s = "";
s = s + (isTryCatch() ? "try {\n" : "");
s = s + retToString();
s = s + doToString();
s = s + getName();
s = s + (isTryCatch() ? "\t\t} catch (Exception e) {e.printStackTrace();}\n" : "");
return s;
}
public String codeToString() {
String s = "";
s = s + (isTryCatch() ? "try {\n" : "");
s = s + code;
s = s + (isTryCatch() ? "\t\t} catch (Exception e) {e.printStackTrace();}\n" : "");
return s;
}
}