title: How do I obtain a ScalaSig for a companion object?
body: <p>The scalap library has functionality for parsing Scala-specific information out of classfiles.  For a regular class, I can obtain information as such:</p>
  
  <pre><code>scala&gt; ScalaSigParser.parse(classOf[BasicCase])
  res46: Option[scala.tools.scalap.scalax.rules.scalasig.ScalaSig] = 
  Some(ScalaSig version 5.0
  0: ClassSymbol(BasicCase, owner=&lt;empty&gt;, flags=40000040, info=5 ,None)
  1: BasicCase
  2: &lt;empty&gt;
  3: &lt;empty&gt;
  4: NoSymbol
  5: ClassInfoType(ClassSymbol(BasicCase, owner=&lt;empty&gt;, flags=40000040, info=5 ,None),List(TypeRefType(ThisType(java.lang),java.lang.Object,List()), TypeRefType(ThisType(scala),scala.ScalaObject,List()), TypeRefType(ThisType(scala),scala.Product,List())))
  6: TypeRefType(ThisType(java.lang),java.lang.Object,List())
  7: ThisType(java.lang)
  8: java.lang
  9: lang
  10: java
  11: java
  12: java.lang.Object
  13: Object
  14: TypeRefType(ThisType(scala),scala.ScalaObject,List())
  15: ThisType(scala)
  16: scala
  17: scala
  18: scala.ScalaObject
  19: ScalaObject
  20: TypeRefType(ThisType(scala),scala.Pr...
  scala&gt; 
  </code></pre>
  
  <p>...and from there get all sorts of goodies about the internals.  But for the companion object:</p>
  
  <pre><code>scala&gt; ScalaSigParser.parse(classOf[BasicCase$])
  res47: Option[scala.tools.scalap.scalax.rules.scalasig.ScalaSig] = None
  </code></pre>
  
  <p>...I get nothing.  However, Scalap will work on the companion object class:</p>
  
  <pre><code>scalap -cp . BasicCase$
  package BasicCase$;
  final class BasicCase$ extends scala.runtime.AbstractFunction3 with java.io.Serializable with scala.ScalaObject {
    def this(): scala.Unit;
    def apply(scala.Any, scala.Any, scala.Any): scala.Any;
    def readResolve(): scala.Any;
    def apply(scala.Int, java.lang.String, scala.Option): BasicCase;
    def unapply(BasicCase): scala.Option;
  }
  object BasicCase$ {
    final val MODULE$: BasicCase$;
  }
  </code></pre>
  
  <p>So there must be a way, I just haven't been able to find it.  Anyone have any ideas?</p>
  
  <p>EDIT:  I found it, but still need more:</p>
  
  <pre><code>scala&gt; bcSig.topLevelObjects
  res59: List[scala.tools.scalap.scalax.rules.scalasig.ObjectSymbol] = List(ObjectSymbol(BasicCase, owner=&lt;empty&gt;, flags=200402, info=124 ))
  
  scala&gt; bcSig.topLevelObjects.head
  res60: scala.tools.scalap.scalax.rules.scalasig.ObjectSymbol = ObjectSymbol(BasicCase, owner=&lt;empty&gt;, flags=200402, info=124 )
  </code></pre>
  
  <p>Unfortunately the children method doesn't seem to give me methods:</p>
  
  <pre><code>scala&gt; res60.children                          
  res70: Seq[scala.tools.scalap.scalax.rules.scalasig.Symbol] = List()
  </code></pre>
  
  <p>Unlike with the regular class:</p>
  
  <pre><code>scala&gt; bcSym.children
  res71: Seq[scala.tools.scalap.scalax.rules.scalasig.Symbol] = List(MethodSymbol(id, owner=0, flags=29400200, info=25 ,None), MethodSymbol(id , owner=0, flags=21080004, info=26 ,None), MethodSymbol(name, owner=0, flags=29400200, info=33 ,None), MethodSymbol(name , owner=0, flags=21080004, info=34 ,None), MethodSymbol(data, owner=0, flags=29400200, info=45 ,None), MethodSymbol(data , owner=0, flags=21080004, info=46 ,None), MethodSymbol(&lt;init&gt;, owner=0, flags=200, info=53 ,None), MethodSymbol(copy, owner=0, flags=200200, info=61 ,None), MethodSymbol(copy$default$1, owner=0, flags=2200200, info=67 ,None), MethodSymbol(copy$default$2, owner=0, flags=2200200, info=80 ,None), MethodSymbol(copy$default$3, owner=0, flags=2200200, info=84 ,None), MethodSymbol(hashCode, owner=0, flags=40000220, i...
  </code></pre>