cherry-pick of lrytz/scala 7f5a93999a
Make MethodWriter public.

And add some accessors. This is all scala-driven.
CustomAttr class.
sbt build.