diplomacy: skip anonymous class names
This commit is contained in:
parent
18b8a61775
commit
2ca03384ec
@ -55,7 +55,12 @@ abstract class LazyModule()(implicit val p: Parameters)
|
|||||||
private def findValName =
|
private def findValName =
|
||||||
parent.flatMap(_.childNames.find(_._2 eq this)).map(_._1)
|
parent.flatMap(_.childNames.find(_._2 eq this)).map(_._1)
|
||||||
|
|
||||||
lazy val className = getClass.getName.split('.').last
|
private def findClassName(c: Class[_]): String = {
|
||||||
|
val n = c.getName.split('.').last
|
||||||
|
if (n.contains('$')) findClassName(c.getSuperclass) else n
|
||||||
|
}
|
||||||
|
|
||||||
|
lazy val className = findClassName(getClass)
|
||||||
lazy val valName = suggestedName.orElse(findValName)
|
lazy val valName = suggestedName.orElse(findValName)
|
||||||
lazy val outerName = if (nodes.size != 1) None else nodes(0).gco.flatMap(_.lazyModule.valName)
|
lazy val outerName = if (nodes.size != 1) None else nodes(0).gco.flatMap(_.lazyModule.valName)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user