sectionName = sectionName.substring(1);
while(sectionName.endsWith("="))
sectionName = sectionName.substring(0, sectionName.length()-1);
+ sectionName = sectionName.trim();
+
+ if (sectionName.indexOf(':') != -1) {
+ String subtype = sectionName.substring(sectionName.indexOf(':')+1);
+ sectionName = sectionName.substring(0, sectionName.indexOf(':'));
+ boolean good = false;
+ for(Class c = fleet.getClass(); c!=Object.class; c = c.getSuperclass()) {
+ if (subtype.equals(c.getSimpleName()))
+ good = true;
+ }
+ if (!good) {
+ sectionName = null;
+ continue;
+ }
+ }
sectionName = sectionName.trim().toLowerCase();
continue;
}
public BitVector getConstant(String name) {
BitVector c = constants.get(name);
- if (c==null)
- throw new RuntimeException("unknown constant " + name);
+ if (c==null) throw new RuntimeException("unknown constant " + name);
return c;
}