// partname.beh -- Part name construction // $Id: partname.beh,v 1.2 2003/01/09 07:24:27 dougo Exp $ ClassGraph { /** Fill in any missing part names by lowercasing the name of the part class. */ void fillInPartNames() = allParts { before Part {{ if (host.get_partname() == null) { StringBuffer newname = new StringBuffer(host.get_classname().basename()); newname.setCharAt(0, Character.toLowerCase(newname.charAt(0))); host.set_partname(PartName.parse(newname.toString())); } }} } } ClassName { String basename() {{ String s = toString(); return s.substring(s.lastIndexOf(".") + 1); }} }