File thisOutputDirectory,
File thisDoNotReplaceDirectory, String[] excludes,
String packageDirectory, String key, String value) throws MojoExecutionException {
String outputName = templateName.replaceFirst("\\.java\\.t$",
".java");
Context vc = new VelocityContext();
if (key != null) {
String keyCap = key.toUpperCase().charAt(0) + key.substring(1);
outputName = outputName.replaceAll("KeyType", keyCap);
vc.put("keyType", key);
vc.put("keyTypeCap", keyCap);
vc.put("keyObjectType", typeToObjectTypeMap.get(key));
boolean floating = "float".equals(key) || "double".equals(key);
vc.put("keyTypeFloating", floating ? "true" : "false");
}
if (value != null) {
String valueCap = value.toUpperCase().charAt(0) + value.substring(1);
outputName = outputName.replaceAll("ValueType", valueCap);
vc.put("valueType", value);
vc.put("valueTypeCap", valueCap);
vc.put("valueObjectType", typeToObjectTypeMap.get(value));
boolean floating = "float".equals(value) || "double".equals(value);
vc.put("valueTypeFloating", floating ? "true" : "false");
}
File outputFile = new File(thisOutputDirectory, outputName);
if (thisDoNotReplaceDirectory != null) {
File dnrf = new File(thisDoNotReplaceDirectory, outputName);