private String converParameter(String s, Parameter parameter) {
return s.replaceAll(Util.string2regexForJava(PARAMETER_NAME),
parameter.getName())
.replaceAll(Util.string2regexForJava(PARAMETER_NAME_ONE_LOWER_CASE),
Util.one2LowerCase(parameter.getName()))
.replaceAll(Util.string2regexForJava(PARAMETER_NAME_ONE_UPPER_CASE),
Util.one2UpperCase(parameter.getName()))
.replaceAll(Util.string2regexForJava(PARAMETER_NAME_ALL_LOWER_CASE),
parameter.getName().toLowerCase())
.replaceAll(Util.string2regexForJava(PARAMETER_NAME_ALL_UPPER_CASE),
parameter.getName().toUpperCase())
//PARAMETER_NOTE
.replaceAll(Util.string2regexForJava(PARAMETER_NOTE),
parameter.getNote())
.replaceAll(Util.string2regexForJava(PARAMETER_NOTE_ONE_LOWER_CASE),
Util.one2LowerCase(parameter.getNote()))
.replaceAll(Util.string2regexForJava(PARAMETER_NOTE_ONE_UPPER_CASE),
Util.one2UpperCase(parameter.getNote()))
.replaceAll(Util.string2regexForJava(PARAMETER_NOTE_ALL_LOWER_CASE),
parameter.getNote().toLowerCase())
.replaceAll(Util.string2regexForJava(PARAMETER_NOTE_ALL_UPPER_CASE),
parameter.getNote().toUpperCase())
//PARAMETER_CLASS
.replaceAll(Util.string2regexForJava(PARAMETER_CLASS),
parameter.getClazz())
.replaceAll(
Util.string2regexForJava(PARAMETER_CLASS_ONE_LOWER_CASE),
Util.one2LowerCase(parameter.getClazz()))
.replaceAll(Util.string2regexForJava(PARAMETER_CLASS_ONE_UPPER_CASE),
Util.one2UpperCase(parameter.getClazz()))
.replaceAll(Util.string2regexForJava(PARAMETER_CLASS_ALL_LOWER_CASE),
parameter.getClazz().toLowerCase())
.replaceAll(Util.string2regexForJava(PARAMETER_CLASS_ALL_UPPER_CASE),
parameter.getClazz().toUpperCase());
}
private String convert(String str, Bean bean) {
return str.replaceAll(Util.string2regexForJava(BEAN_NAME),
bean.getName())
.replaceAll(Util.string2regexForJava(BEAN_NAME_ONE_LOWER_CASE),
Util.one2LowerCase(bean.getName()))
//BEAN_NOTE
.replaceAll(Util.string2regexForJava(BEAN_NOTE),
bean.getNote())
.replaceAll(Util.string2regexForJava(BEAN_NOTE_ONE_LOWER_CASE),
Util.one2LowerCase(bean.getNote()))
//SINCE
.replaceAll(Util.string2regexForJava(BEAN_SINCE), bean.getSince())
//VERSION
.replaceAll(Util.string2regexForJava(BEAN_VERSION), bean.getVersion())
//AUTHOR
.replaceAll(Util.string2regexForJava(BEAN_AUTHOR), bean.getAuthor())
//A
.replaceAll(Util.string2regexForJava(BEAN_ALL_PARAMETERS_SET), bean.getA())
//B
.replaceAll(Util.string2regexForJava(BEAN_ALL_PARAMETERS), bean.getB())
//C
.replaceAll(Util.string2regexForJava(BEAN_ALL_PARAMETERS_STR), bean.getC())
//D
.replaceAll(Util.string2regexForJava(BEAN_ALL_PARAMETERS_COMMENT), bean.getD());
}