File |
Line |
org\djunits\generator\GenerateDJUNIT.java |
505 |
org\djunits\generator\GenerateDJUNIT.java |
863 |
private static String formulasVector(String java, String errorType, String prefix)
{
String ret = java;
while (ret.contains("%FORMULAS%"))
{
int pos = ret.indexOf("%FORMULAS%");
ret = ret.replaceFirst("%FORMULAS%", "");
int end = ret.indexOf("%", pos);
if (end == -1)
{
System.err.println("Closing % not found for %FORMULAS% in file for type " + errorType);
return ret;
}
String type = ret.substring(pos, end);
if (!formulas.containsKey(type))
{
System.err.println("Formulas in FORMULAS.txt does not contain entry for type " + errorType);
return ret.substring(0, pos - 1) + ret.substring(pos + type.length() + 2, ret.length() - 1);
}
String fStr = "";
ret = ret.substring(0, pos - 1) + fStr + ret.substring(pos + type.length() + 1, ret.length() - 1);
}
return ret;
}
/****************************************************************************************************************/
/********************************************* DOUBLEVECTOR *****************************************************/
/****************************************************************************************************************/
/**
* Generate all Abs + Rel classes in value.vdouble.vector.
* @throws IOException on I/O error
* @throws URISyntaxException when file could not be found on thhe file system
*/
private static void generateDoubleVectorAbsRel() throws IOException, URISyntaxException |
File |
Line |
org\djunits\generator\GenerateStaticUNITS.java |
69 |
org\djunits\generator\GenerateStaticUNITS.java |
84 |
for (Field f : c.getFields())
{
if (Modifier.isPublic(f.getModifiers()) && Modifier.isStatic(f.getModifiers())
&& Modifier.isFinal(f.getModifiers()) && !f.getName().equals("SI")
&& !f.getName().equals("STANDARD_UNITS"))
{
String n = f.getName();
if (f.getName().contains("ELECTRONVOLT"))
{
n = cs.trim() + "_" + n;
} |
File |
Line |
org\djunits\generator\GenerateDJUNIT.java |
1222 |
org\djunits\generator\GenerateXSD.java |
338 |
private static void makeAndCleanAbsolutePath() throws FileNotFoundException
{
URL mainURL = URLResource.getResource("/");
String path;
try
{
path = mainURL.toURI().getPath();
}
catch (URISyntaxException exception)
{
path = mainURL.getPath();
}
if (path.endsWith("/target/classes/"))
{
path = path.substring(0, path.length() - "/target/classes/".length());
}
path += generatedCodeRelativePath;
if (!new File(path).exists())
{
new File(path).mkdirs();
} |